Raw scsi control

Hello,
I’m looking at writing a special control library for my CDROM drive and
was wondering if there is a way to write raw commands to the devices. I see
DCMD_CAM_PASS_THRU and I think it might work, but I keep getting an “invalid
argument” return from devctl when I call it. If DCMD_CAM_PASS_THRU is what
I would use, does anybody have an example of how to use it?

Thanks!

John