5

It seems that I do not quite understand the differences between Microsoft's definition to "Logical Drive" and "Volume".

Is every logical drive a volume but not the other way around ?

I would love to get an explanation + a simple example showing the difference.

f12394
  • 51
  • 1

1 Answers1

0

GetLogicalDrives returns bitmask value (which u can consider binary representation of an integer). this number, while tracing from left to write in binary format, gives you if the corresponding driver is present or not starting from A:. e.g. If you get the return value as 12, i.e. 1100, this shows tracing from left, A, and B drives are not present and C and D drives are present.

GetLogicalDrives doesn't include information related to system recovery volumes or windows reserved.

Whereas FindFirstVolume+FindNextVolume gives all the volumes present including Windows reserved and system recovery partition. the return value is a unique GUID for the volume which can also be found in registry.(HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC\Volume)

DTdev
  • 538
  • 1
  • 18
  • 32