IOCTL for Miniport driver

Hi,

how can i send ioctl from application to miniport driver.
i using IRB_FUNCTION_MINIPORT_COMMAND and the Device Io control getting error 1.

what are the possible way to send IOCTL.

Thanks
basco

Hi Sam,

how can i send ioctl from application to miniport driver
– You can use IOCTL_SCSI_MINIPORT to send a command to the Mniport
Need to fill in the paramenters of the SRB_IO_CONTROL Structure and issue the command using DeviceIoControl.

But, the miniport driver you are using should support SRB_FUNCTION_IO_CONTROL Function Implemented.

hi Narendra

thanks for ur answer.

my miniport driver will support only IRB function
for that how can i use and send IOCTL to miniport driver

regards
sam

Hi Sam,
If your requirement is just to send an ATA command directly to your miniport driver you can use IOCTL_ATA_PASS_THROUGH_DIRECT Interface provided by Microsoft.
You need to fill the ATA_PASS_THROUGH_DIRECT Structure parameters and use Pass through Interface to send the command directly to the device.

Regards,
Narendra.

hi Narendra

thanks lot.

my requriment i wand read pci configuration space throug ata driver
so i need information about how i will send IOCTL from user space to get these
information from ata miniport driver

regards
Sam

Hi sam,

I understand your requirement,
Are you implementing the ata miniport driver or you are using the Microsoft’s default ATA miniport driver?

Thanks,
Narendra.

hi Narendra,

i am using Microsoft’s default ATA miniport driver.

regards
Sam

Consider creating a an upper filter driver that handles the IOCTL and
turns it into IRP_MJ_PNP/IRP_MN_READ_CONFIG to pass down the stack.

Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“xxxxx@hcl.in” wrote in message news:xxxxx@ntdev:

> hi Narendra,
>
> i am using Microsoft’s default ATA miniport driver.
>
> regards
> Sam

hi Narendra,

i am using Microsoft’s default ATA miniport driver.

regards
sam

Hi Sam,

you need to implement the Upper Class Filter Driver that handles your IOCTL and issues a IRP with IRP_MJ_PNP/IRP_MN_READ_CONFIG to the port.

You Can go through the follwoing link.
http://msdn.microsoft.com/en-us/library/ff536890(v=vs.85).aspx

Thanks,
Narendra.

Hi Narendra,

Thanks lot.

Thanks
Sam.