Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!cs.utexas.edu!uunet!math.fu-berlin.de!uniol!Norbert.Zacharias From: Norbert.Zacharias@arbi.informatik.uni-oldenburg.de (Norbert Zacharias) Newsgroups: comp.os.msdos.programmer Subject: Re: Help: Finding legal drives on system Message-ID: <5017@uniol.UUCP> Date: 12 Mar 91 11:38:25 GMT References: <3815@ac.dal.ca> <8795@plains.NoDak.edu> Organization: University of Oldenburg, Germany Lines: 35 bt@eng.auburn.edu (bt garner) writes: >In article <3815@ac.dal.ca> merrett@ac.dal.ca writes: >>Is there any way of checking for 'legal' drives on a particular system, in >>C, without actually having to read from the drive? (i.e. I don't want it >>plopping that 'insert floppy' message in the middle of my pretty windows) >and in article <8795@plains.NoDak.edu> (Jim Nelson) responded: >>About the only way to do it is to check the biosequip word for number of >>floppies. I don't know it's memory address at the moment, but TC has a >>function to find it for you, then you do a little bit manipulation to do the >>rest. >The equipment list is in [0:410H], if bit 0 is set, then floppies do >exist on the system (bits 6 & 7 will tell you the number-1). To check >for the presence of hard drives, the best way (that I've found) is to use >Int21, Function 36H (Get Free Disk Space) until AX returns FFFF (Invalid >Drive Specification). There is an other way. I use the INT 21H 44H Funktion (IOCTL Is Changeable) In the documetation they wrote this Funktion is available only one have loadet networksoftware. But nevertheless it works without any netware The disk is present if CF = 0 If CF = 1 and AX = 15 the disk is not available hope it helps Norbert -- ============================================================================= Norbert Zacharias Norbert.Zacharias@arbi.informatik.uni-oldenburg.de FB Physik 148964@DOLUNI1.bitnet Carl-von-Ossietzky-Universitaet Tel. 0049-441-7983527 Was Du nicht willst das man Dir tu, das will auch nicht was willst denn Du? Heinz Erhard =============================================================================