This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Detecting CD-ROM drive


Arlindo,

GetLogicalDrives() will return a dword mask specifying which drives
exist in the system, bit0 corresponding to drive "A:".  If the bit is
true, the drive exists.  Once you have this info, you can then call
GetDriveType() which will return one of the following:

0                 - type unknown
1                 - root dir does not exist
DRIVE_REMOVEABLE
DRIVE_FIXED
DRIVE_REMOTE
DRIVE_CDROM
DRIVE_RAMDISK

BTW, if you are on NT, then you can call GetLogicalDriveStrings() rather
than GetLogicalDrives() which will return (arguably) more information
in the form of:
A:\<null>
B:\<null>
...
<null>

-Thomas
 
=> Arlindo da Silva writes:
> 
> Does anybody know how to determine which drive (d:, e:, ...) is a CDROM? 
> Is there any native function for this? Thanks.
> 
> -- 
> Arlindo da Silva    
> dasilva@alum.mit.edu
> 
> 
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".
> 

======================================================================
Thomas Dryden                                    tdryden@iil.intel.com
Intel Corporation, Haifa Israel                  phone: 972-4-865-5871
======================================================================
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]