getting device object

Hi,

I need to get the device object of for a logical drive. I get the device
object by openinig the root dir. of a drive, then get the fileobject from
the handle returned (by calling zwcreatefile above) and then call
IoGetRelatedDeviceObject.
But is there any other way to get the device object without opening the
root dir?

Regards.

IoGetDeviceObjectPointer

-----Original Message-----
From: xxxxx@yahoo.com [mailto:xxxxx@yahoo.com]
Sent: Monday, October 07, 2002 5:55 AM
To: NT Developers Interest List
Subject: [ntdev] getting device object

Hi,

I need to get the device object of for a logical drive. I get the device
object by openinig the root dir. of a drive, then get the fileobject from
the handle returned (by calling zwcreatefile above) and then call
IoGetRelatedDeviceObject.
But is there any other way to get the device object without opening the
root dir?

Regards.


You are currently subscribed to ntdev as: xxxxx@appstream.com
To unsubscribe send a blank email to %%email.unsub%%

Hi,

Use IoGetDeviceObjectPointer on the Unicode string version of “\??\X:”,
where X is the desired drive character.
Result is the uppermost device object in the device stack for the named
device.

Regards

Bi Chen
To: “NT Developers Interest List”
Sent by: cc:
xxxxx@lis Subject: [ntdev] RE: getting device object
ts.osr.com

07.10.2002 19:40
Please respond to “NT
Developers Interest
List”

IoGetDeviceObjectPointer

-----Original Message-----
From: xxxxx@yahoo.com [mailto:xxxxx@yahoo.com]
Sent: Monday, October 07, 2002 5:55 AM
To: NT Developers Interest List
Subject: [ntdev] getting device object

Hi,

I need to get the device object of for a logical drive. I get the device
object by openinig the root dir. of a drive, then get the fileobject from
the handle returned (by calling zwcreatefile above) and then call
IoGetRelatedDeviceObject.
But is there any other way to get the device object without opening the
root dir?

Regards.


You are currently subscribed to ntdev as: xxxxx@appstream.com
To unsubscribe send a blank email to %%email.unsub%%

You are currently subscribed to ntdev as: xxxxx@utimaco.de
To unsubscribe send a blank email to %%email.unsub%%

hi,

i have already tried it. but it fails with 0xc0000043 error code i.e.
STATUS_SHARING_VIOLATION. what should be the ACCESS_MASK for the call?

regards.

Hi,
I’m using FILE_READ_ATTRIBUTES, which does not cause the file system to be
mounted.
Else

xxxxx@yahoo.c
om To: “NT Developers Interest List”
Sent by: cc:
xxxxx@lis Subject: [ntdev] RE: getting device object
ts.osr.com

08.10.2002 07:21
Please respond to “NT
Developers Interest
List”

hi,

i have already tried it. but it fails with 0xc0000043 error code i.e.
STATUS_SHARING_VIOLATION. what should be the ACCESS_MASK for the call?

regards.


You are currently subscribed to ntdev as: xxxxx@utimaco.de
To unsubscribe send a blank email to %%email.unsub%%