title: Maximum number of drives in windows?
body: <p>I'm trying to figure out the available disk space programmatically in windows. For this, I need to first get a list of the available drives, then check which of those are local drives and then query the available bytes on each local drive.</p>
  
  <p>I'm a bit stuck on the first part, where the API presents two functions:</p>
  
  <ol>
  <li><code>GetLogicalDrives</code> (<a href="http://msdn.microsoft.com/en-us/library/aa364972(VS.85).aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/aa364972(VS.85).aspx</a>) which gives you a DWORD with the bits set (bit 0 if drive A is present, bit 1 if drive B etc)</li>
  <li><code>GetLogicalDriveStrings</code> (<a href="http://msdn.microsoft.com/en-us/library/aa364975(VS.85).aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/aa364975(VS.85).aspx</a>) which gives you the actual strings.</li>
  </ol>
  
  <p>Now, although I'll be using strings later on, I'd prefer using the first option for querying. However, on my system a DWORD is typedef-ed to "unsigned long", which is 4 bytes, whereas drive letters only range A-Z (26 - i think - characters). Obviously, one can define more than 26 drives on their system (however unlikely they are to do so) - so I was wondering if there was any convention for those drives. Can someone point me to a resource on this?</p>
  
  <p>Thanks.</p>