MessageThat is what I’m doing. But the device I’m trying to get its file system is (for example) \Device\CdRom . As you say it works OK in Win2000, but in WXP this device has an attached one, and this device has Vpb = NULL.
----- Original Message -----
From: Jamey Kirby
To: File Systems Developers
Sent: Thursday, November 08, 2001 4:36 PM
Subject: [ntfsd] RE: Get File System Device from device
Like I said. If there is a filter, the next device in the link points to the filter. You need to get the VPB of the bottom device To do this, try the following code:
FileSystemDevice = GetFileSystemFromVpb(DeviceObject->Vpb->RealDevice->Vpb);
This will get you to the VPB of the bottom (real) device, not the filter above it.
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Ratmil Torres
Sent: Thursday, November 08, 2001 11:32 AM
To: File Systems Developers
Subject: [ntfsd] RE: Get File System Device from device
Yes, but how do I get the pointer to the device? GetDeviceObjectPointer doesn’t return the real pointer when there’s an attached device, then it returns a pointer to the top most attached device.
Thanks
----- Original Message -----
From: Jamey Kirby
To: File Systems Developers
Sent: Thursday, November 08, 2001 4:10 AM
Subject: [ntfsd] RE: Get File System Device from device
DeviceObject->Vpb->RealDevice->Vpb.
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Ratmil Torres
Sent: Thursday, November 08, 2001 8:31 AM
To: File Systems Developers
Subject: [ntfsd] Get File System Device from device
Hi, I’m repeating this question because our mail server was down. Thanks.
----- Original Message -----
From: Ratmil Torres
To: File Systems Developers
Sent: Thursday, November 01, 2001 4:34 PM
Subject: [ntfsd] Get File System Device from device
Hello,
I need to get a pointer to the File System Device of a device object given his name. For example from “\Device\CdRom0” I would like to get his File System Device which would be an unnamed device from the “\FileSystem\Cdfs” driver.
I was doing it this way :
{
DeviceObject = IoGetDeviceObjectPointer(“\Device\CdRom0”); // Get device using IoGetDeviceObjectPointer
// This function takes 4 parameters actually
FileSystemDevice = GetFileSystemFromVpb(DeviceObject->Vpb); // Get File System Device Object from Vpb
}
This works OK, except when “\Device\CdRom0” has an attached device, in that case IoGetDeviceObjectPointer returns the attached device which doesn’t have the Vpb I want.
How could I get the real device (not the attached device) from the device name? Or better, how can I get the File System Device Object from the device name?
Thanks.
You are currently subscribed to ntfsd as: xxxxx@seg.inf.cu
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: xxxxx@seg.inf.cu
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: xxxxx@seg.inf.cu
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@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