Path: utzoo!yunexus!stpl!peterc From: peterc@stpl.UUCP (Peter CAMILLERI) Newsgroups: comp.sys.ibm.pc Subject: Problems finding out how many drives a system has. Keywords: MSDOS, BUGS Message-ID: <188@stpl.UUCP> Date: 19 May 89 13:48:39 GMT Article-I.D.: stpl.188 Reply-To: peterc@stpl.UUCP (Peter CAMILLERI) Organization: ISTS/Solar Terrestrial Physics Lab Lines: 32 Hello Netland! I am in the process of writing a "friendly" DOS shell program. One of the things that I need to know is how many drives are present. Refering to my copy of Advanced MSDOS I saw that the simple procedure was to 1) Get the Default Drive using DOS FN 25 2) Set the Default Drive to the number obtained above using DOS FN 14, which as a side effect returns the number of Drives! Neat Huh? Too bad it does'nt work, { In spite of the fact that the manual says it should :-} It always returns 5 (Five) as the number of drives despite the fact that I have only 3 (Three) A & B are floppies, and C a hard disk. { I am running Compaq DOS 3.2 if it matters. } My current kludge is to use the equipmnet list to compute the number of floppies, and get the allocation info on each potential hard drive until I find one that does'nt exist. Problem here == SLOW SLOW SLOW !!!! So what I ned is a FAST, RELIABLE way to find out how many drives a system has. P.S. I it makes any difference, I think you should know that I intend to present the reults of my work, source code and all, in a manner similar to the GNU stuff being done at the FSF. IE: free access only. -- Peter Camilleri peter@stpl.UUCP Elan Data Technology Inc. 836 Yonge St., Toronto, Ontario, uunet!mnetor!yunexus!stpl!peter CANADA M4W 2H1 (416) 968-6668