title: How to determine the type of a drive?
body: <p>I am trying to figure out the device type for a particular drive. I'd like to know how to do it on Mac OS X and Linux as well, but for now if that's too much a Windows solution would suffice.</p>
  
  <p>so, let's say I have a drive H. I can determine if the device is a removable drive through the Win32 API function GetDriveType(). I can find that out on Mac OS X as well.</p>
  
  <p>But what I can't seem to find, in a reliable way, is the device type. Like, is it a USB Flash Drive, portable hard drive (PHD) etc.</p>
  
  <p>Digging through the registries in Windows, I can't seem to find much info as well. Although I'd prefer to use some API for that if possible, I'll use the registry if required.</p>
  
  <p>For now, what I'm interested in is.. is the drive a flash drive (so I can show a Usb flash drive icon in my program) or a portable hard drive (so, a PHD icon will be displayed).</p>