From: dbe AT wgn DOT net ($Bill Luebkert) Subject: Re: Detecting CD-ROM drive 30 Oct 1997 14:14:04 -0800 Message-ID: <3458FE89.8AE4B1D7.cygnus.gnu-win32@wgn.net> References: <199710300338 DOT WAA00907 AT woodmore DOT gsfc DOT nasa DOT gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Arlindo da Silva Cc: gnu-win32 AT cygnus DOT com Arlindo da Silva wrote: > > Does anybody know how to determine which drive (d:, e:, ...) is a CDROM? > Is there any native function for this? Thanks. Have you tried something like: #include #include #include main () { int ii; for (ii = 0; ii < 26; ii++) { char tmp[32]; int type; (void)sprintf (tmp, "%c:\\", ii + 'A'); type = GetDriveType (tmp); if (type == DRIVE_CDROM) { (void)printf ("%s\n", tmp); } } } -- ,-/- __ _ _ $Bill Luebkert (_/ / ) // // DBE Collectibles / ) /--< o // // http://www.wgn.net/~dbe/ -/-' /___/_<_