Re: How do you get the number of physically installed hard disks (Win32)?

To give you some idea of what we are doing. We have SAN setup and we are
using snapshot and disks come offline and online very often.Handling devices
in form of PHYSICALDRIVEN is kind of familiar and other components would not
have to chage from NT world and the basic premise in the code would still
hold. If ATALL it cann’t be done, may be i would think of using interface

I have used in past NtQueryDirectoryObject, but not for this purpose. Do u
think this is the right approach.


-----Original Message-----
From: Ralf Buschmann []
Sent: Thursday, October 10, 2002 11:05 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How do you get the number of physically installed
hard disks (Win32)?


you wrote on Friday, October 11, 2002, 02:49:22:

PK> In my experience, I have seen the \.\PHYSICALDRIVEN not to be in
PK> sequence, as in from 0 to N-1 especially in SAN environment. For an
PK> example, I have disk being shown as \.\PHYSICALDRIVE15 when there
PK> are just 3 disks. Is there any way to this win32 name from other
PK> win32 name, which you get from interface detail info.

Not that I’m aware of. But why do you need to use \.\PHYSICALDRIVEx at
all if you can open the device by other means, as discussed?

PK> Winobj info is updated for such devices, any clue which calls/data
PK> structures is it using?

WinObj uses the undocumented NtQueryDirectoryObject() API to walk the
object manager name space. Get Gary Nebbetts’s “Native API Reference”
book if you want to go down this path.


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