Let’s try the “ntfsd” list as well
Here’s some additional info on this problem for anyone who might know
anything more and would like to give a hint.
Creating new partitions on a disk also does not work
(IoGetDeviceObjectPointer returns 0xC0000034).
Here’s part of the attachment code:
Note:
uniNtDevName holds either “\Device\HarddiskX\PartitionY” or
“\Device\HarddiskVolumeZ”.
uniMyDevName holds our driver’s device name
…
status = IoGetDeviceObjectPointer( &uniNtDevName, FILE_READ_ATTRIBUTES,
&pNtFileObj, &pNtDevObj );
if((status == STATUS_SUCCESS) && (pNtDevObj))
{
if(pNtFileObj) ObDereferenceObject( pNtFileObj );
if((pNtDevObj != NULL) && (pNtDevObj->Vpb != NULL)
&& !(pNtDevObj->Vpb->Flags & VPB_MOUNTED))
{
status = IoCreateDevice(pDriverObj, sizeof( MY_VOLUME_EXTENSION ),
&uniMyDevName, FILE_DEVICE_DISK, 0, FALSE,
ppMyDevObj );
if(status == STATUS_SUCCESS)
{
if (!fBootup) (*ppEmDevObj)->Flags &= ~DO_DEVICE_INITIALIZING;
*ppTargetDevObj = IoAttachDeviceToDeviceStack( (*ppMyDevObj),
pNtDevObj );
if(*ppTargetDevObj)
{
(*ppMyDevObj)->Flags |= DO_DIRECT_IO;
(*ppMyDevObj)->AlignmentRequirement =
(*ppTargetDevObj)->AlignmentRequirement;
IoRegisterShutdownNotification( (*ppMyDevObj) );
}
…
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Theodoros David
Sent: Friday, December 14, 2001 10:59 AM
To: NT Developers Interest List
Subject: [ntdev] attaching to a partition on Win2KI’m trying to port a filter driver from NT to Win2k. On the NT version the
driver creates its own device and attaches it to
\Device\HarddiskX\PartitionY. Using OSR’s DeviceTree I can see
the driver’s
devices attached to the actual partitions.
This, however, does not work in Win2K.
“\Device\HarddiskX\PartitionY” is now
a link to “\Device\HarddiskVolumeZ”. Using ZwQuerySymbolicLinkObject I get
the new device name (\Device\HarddiskVolumeZ) and attach the
driver’s device
to it. It still does not work. Any flush on the particular
partition hangs.
OSR’s DeviceTree does not show my driver’s device attached to the
partition
device. Of course OSR’s DeviceTree shows the partition devices as
“\Device\HarddiskX\DP(Y)Offset-Length+Z”.
Is this the real partition device name that I should be attaching my
driver’s device? How do I get this device name for each partition?Any help would be greatly appreciated.
Theodoros David
SteelEye Technology
xxxxx@steeleye.com
http://www.steeleye.com
You are currently subscribed to ntdev as: xxxxx@steeleye.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@steeleye.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com