DeviceIoControl in a driver

Hi all,

I was wondering if it’s possible to call DeviceIoControl in a driver. I
want to send ATA commands to my disk, using the driver I have. Can anyone
give me a pointer?

Thanks in Advance,

Matt

Matt,

You can’t call DeviceIoControl from within your kernel driver. What you
do is build your own IRP. Try using IoBuildDeviceIoControlRequest() and
then IoCallDriver().

I’ve never done it personally, but Peter mentioned it in OSR’s fantastic
driver course.

good luck.

john.