Hi,
I want to get some information about hard disk, e.g, serial number of harddisk. But my program works in the file system
filter driver level.
Can I send IRP directly to disk driver? How should I fill IRP I have created, for example,
Irp->StackLocation?
In bad need of help! Thanks!
Well what type of IRP? If it is a common type you should be using
IoBuildAsynchronousFsdRequest, IoBuildSynchronousFsdRequest, or
IoBuildDeviceIoControlRequest. Under any circumstances, the various IRP’s
are well documented in the DDK, look at the description for the fields you
need, if it is not a standard one from the calls above. You can call the
disk, assuming this is a mini-filter FltGetDiskDeviceObject will get you
the disk device object you need for IoCallDriver.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply
wrote in message news:xxxxx@ntfsd…
> Hi,
>
> I want to get some information about hard disk, e.g, serial number of
> harddisk. But my program works in the file system
> filter driver level.
>
> Can I send IRP directly to disk driver? How should I fill IRP I have
> created, for example,
> Irp->StackLocation?
>
> In bad need of help! Thanks!
>
You can send most of IOCTL_STORAGE_xxx down the FS’s volume file object.
The FSD and then FtDisk will just pass them down to the disk stack.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From:
To: “Windows File Systems Devs Interest List”
Sent: Wednesday, October 04, 2006 11:09 PM
Subject: [ntfsd] Can I send IRP to disk driver directly?
> Hi,
>
> I want to get some information about hard disk, e.g, serial number of
harddisk. But my program works in the file system
> filter driver level.
>
> Can I send IRP directly to disk driver? How should I fill IRP I have created,
for example,
> Irp->StackLocation?
>
> In bad need of help! Thanks!
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
> Well what type of IRP? If it is a common type you should be using
IoBuildAsynchronousFsdRequest, IoBuildSynchronousFsdRequest, or
IoBuildDeviceIoControlRequest.
IoAllocateIrp creates non-threaded IRP.
IoBuildAsynchronousFsdRequest is a wrapper around IoAllocateIrp, which does the
buffer management and some IRP filling. Also non-threaded IRP.
IoBuildSynchronousFsdRequest and IoBuildDeviceIoControlRequest are also
wrappers around IoAllocateIrp, but they create the threaded IRPs.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
Thanks for your replies!
I’ll try! : -)