Date: Sun, 29 Sep 1996 15:28:24 +0200 (IST) From: Eli Zaretskii To: Tim Gunn Cc: djgpp AT delorie DOT com Subject: Re: Simple Questions In-Reply-To: <52lnbf$72n@news.mel.aone.net.au> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 29 Sep 1996, Tim Gunn wrote: > Firstly can i found out the available drives in djgpp (network, cdrom, > floppy etc.) There is a function called `getmntent' in the DJGPP library; look it up in the on-line library docs. It should be exactly what you are after. > Secondly how do i test if a program is running under windows? The usual practice is to test for an environment variable called "windir" (in lower-case!). This is usually sufficient, but somebody can set that variable and fool your program. The real test involves calling Interrupt 2Fh function 16h; look it up in the Ralf Brown's Interrupt List. > and how do i find out the version of the DOS/Windows version. DJGPP library has a functioned called `_get_dos_version'. AFAIK, you shouldn't worry about the version of Windows 3.x, but if you do, the above function of Int 2Fh also returns the Windows 3.x version. Windows 95 manifests itself as DOS version 7.