In DriverEntry included like as follows
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
{
DriverObject->MajorFunction[i] = PassThrough;
}
DriverObject->MajorFunction[IRP_MJ_CREATE] = Create;
DriverObject->MajorFunction[IRP_MJ_CREATE_NAMED_PIPE] = Create;
DriverObject->MajorFunction[IRP_MJ_CREATE_MAILSLOT] = Create;
Then
In Create & PassThrough functions
I used the following code
PSFILTER_DEVICE_EXTENSION devExt = (PSFILTER_DEVICE_EXTENSION)(DeviceObject->DeviceExtension);
for the Device object’ devExt->NLExtHeader.StorageStackDeviceObject ’
I called
NewIrp = IoBuildDeviceIoControlRequest(IOCTL_STORAGE_QUERY_PROPERTY, StorageStackDeviceObject, (PVOID)&Query, sizeof(STORAGE_DEVICE_DESCRIPTOR), (PVOID)Buffer, sizeof(STORAGE_DEVICE_DESCRIPTOR) * 4,FALSE, &WaitEvent,IoStatus);
IoSetCompletionRoutine(NewIrp, MyOnIrpComplete, (PVOID)&WaitEvent, TRUE, TRUE, TRUE);
Status = IoCallDriver(StorageStackDeviceObject, NewIrp);
But this call IoCallDriver(StorageStackDeviceObject, NewIrp) hangs in XP 64 bit os
I builded the Driver with WinDDK (version 7600.16385.1 ) Windows7 X64 free build Environment It works windows 2008. server X64 OS . Same driver hangs in XP x64.
Please help me to solve this problem for XP x64.
its 32 bit version I builded withWinDDK (version 7600.16385.1 ) Windows Xp x86 freebuild Environment . It works in all 32 bit windows OS.
Expecting immediate reply
Thanks & Regards,
Dileep Subramanian