Hello everybody,

Is there any api I can use to associate a drive letter with a drive number? e.g how to find the drive number of 'D' if 'D' is a partition of drive 'C"? or would it be the same as 'C' since it's on the same physical drive? I'm using int 21h function 710dh to flush buffers etc. The SDK says:
"DriveNum Drive to reset. This parameter can be 0 for the default drive, 1 for A, 2 for B, and so on."

Extending the scope of that definition leads to 3 for C. If there is only one hard drive then the default drive would be 0 and 3?? or am I thinking wrong about this. Doesn't seem to be much info available at msdn or google. Any suggestions appreciated.

best regards,

Posted on 2002-08-21 14:48:46 by czDrillard
The only thing that I can think of is GetLogicalDrives, it seems that the info on http://msdn.microsoft.com is down.

I don't know if this is what you are looking for or not, but I have used it.

Hope this helps ( I'm no expert ),
Posted on 2002-08-21 15:00:31 by gorshing
Hello gorshing,

That's the api:) I'm embarassed to say that I searched google using drive+number with no relevant results never thinking to include the word 'logical' Some kind of mental block.

Btw, my results of calling GetLogicalDrives returns 04dh = 1001101b exactly the configuration of drives on my computer. Thanks, and next time I will do a more diligent search.

best regards,

Posted on 2002-08-21 22:58:19 by czDrillard
Whooo hoooo :grin:

I think this is the first time that I have helped somebody

Posted on 2002-08-22 09:24:16 by gorshing