|
From: qwert on 6 May 2008 23:53 In application we call the creafile as follows where pVolumeInfo->Extents[0].DiskNumber is the value obtained from IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS ioctl. swprintf(pathBuff, L"\\\\.\\PHYSICALDRIVE%d", pVolumeInfo->Extents[0].DiskNumber); hDevice = CreateFile( pathBuff, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); If we open the device like this the IOCTL doesnt pass thru our filter driver whereas if we open it using "\\\\.\\%c:" in place of "\\\\.\\PHYSICALDRIVE%d"as the input parameter then the IOCTL passes thru our filter driver. If I use "\\\\.\\%c:" the ioctls path is something like below(I havent mentioned all the drivers in the path below) 1.NTFS 2.our filter driver 3.volsnap 4.partmgr But if I use "\\\\.\\PHYSICALDRIVE%d" the ioctl path it shows is 1.\Device\Harddisk2\DR3 I dont see any other driver in the path. can any one explain me the difference between the two calls.I thought that both are opening the same object. I checked the IOCTLs path using IRP Tracker. Thanks in advance
From: Alexander Grigoriev on 7 May 2008 10:13 On what class is your filter installed? "qwert" <qwert(a)discussions.microsoft.com> wrote in message news:38FA63DB-E347-41B6-952D-22C7FA2B7B27(a)microsoft.com... > > In application we call the creafile as follows > where pVolumeInfo->Extents[0].DiskNumber is the value obtained from > IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS ioctl. > > swprintf(pathBuff, L"\\\\.\\PHYSICALDRIVE%d", > pVolumeInfo->Extents[0].DiskNumber); > hDevice = CreateFile( > pathBuff, > GENERIC_READ|GENERIC_WRITE, > FILE_SHARE_READ|FILE_SHARE_WRITE, > NULL, > OPEN_EXISTING, > FILE_ATTRIBUTE_NORMAL, > NULL); > > If we open the device like this the IOCTL doesnt pass thru our filter > driver > whereas if we open it using "\\\\.\\%c:" in place of > "\\\\.\\PHYSICALDRIVE%d"as the input parameter then the IOCTL passes thru > our > filter driver. > If I use "\\\\.\\%c:" the ioctls path is something like below(I havent > mentioned all the drivers in the path below) > 1.NTFS > 2.our filter driver > 3.volsnap > 4.partmgr > > But if I use "\\\\.\\PHYSICALDRIVE%d" the ioctl path it shows is > 1.\Device\Harddisk2\DR3 > > I dont see any other driver in the path. > > can any one explain me the difference between the two calls.I thought that > both are opening the same object. > I checked the IOCTLs path using IRP Tracker. > > Thanks in advance
From: Maxim S. Shatskih on 7 May 2008 11:51 \\.\c: is a volume, if this is a simple partition - then the DO is created by FtDisk and is named like \Device\HarddiskVolume%d \\.\PhysicalDrive%d is the whole physical disk with all partitions on it. -- Maxim Shatskih, Windows DDK MVP StorageCraft Corporation maxim(a)storagecraft.com http://www.storagecraft.com "qwert" <qwert(a)discussions.microsoft.com> wrote in message news:38FA63DB-E347-41B6-952D-22C7FA2B7B27(a)microsoft.com... > > In application we call the creafile as follows > where pVolumeInfo->Extents[0].DiskNumber is the value obtained from > IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS ioctl. > > swprintf(pathBuff, L"\\\\.\\PHYSICALDRIVE%d", > pVolumeInfo->Extents[0].DiskNumber); > hDevice = CreateFile( > pathBuff, > GENERIC_READ|GENERIC_WRITE, > FILE_SHARE_READ|FILE_SHARE_WRITE, > NULL, > OPEN_EXISTING, > FILE_ATTRIBUTE_NORMAL, > NULL); > > If we open the device like this the IOCTL doesnt pass thru our filter driver > whereas if we open it using "\\\\.\\%c:" in place of > "\\\\.\\PHYSICALDRIVE%d"as the input parameter then the IOCTL passes thru our > filter driver. > If I use "\\\\.\\%c:" the ioctls path is something like below(I havent > mentioned all the drivers in the path below) > 1.NTFS > 2.our filter driver > 3.volsnap > 4.partmgr > > But if I use "\\\\.\\PHYSICALDRIVE%d" the ioctl path it shows is > 1.\Device\Harddisk2\DR3 > > I dont see any other driver in the path. > > can any one explain me the difference between the two calls.I thought that > both are opening the same object. > I checked the IOCTLs path using IRP Tracker. > > Thanks in advance
|
Pages: 1 Prev: WLK 1.2 Print Stress Test Failure Options Next: KeWaitForSingleObject never returns |