Cd drive detecting

  • Thread starter Thread starter perspolis
  • Start date Start date
One way is to use (p/invoke) GetDriveType() Win32 API:

[DllImport("kernel32.dll")]

public static extern uint GetDriveType(string lpRootPathName);

If the return value is 5, then it is CD-ROM.

The other option to do the same is to use WMI.


How can I find a letter drive is Cd drive??
 
Back
Top