Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!phigate!ehviea!sun4dts!derek From: derek@sun4dts.dts.ine.philips.nl (derek) Newsgroups: comp.os.msdos.programmer Subject: Re: insert diskette in drive B Keywords: diskette, drive Message-ID: <666@sun4dts.dts.ine.philips.nl> Date: 15 Feb 91 10:57:07 GMT References: <090905.3866@timbuk.cray.com> Lines: 32 dp@hemlock.cray.com (David Polansky) writes: >I am writing an application which will be reading from diskettes quite >frequently. On systems which have only one diskette drive I don't want >the message requeting that the user insert the diskette in drive B (or A) >and then push any key to continue to mess up my display. Is there any way >to intercept this message. If not I know how to detect that there is only >one diskette drive. Is there some way to determine whether it is considered >drive A or drive B at the time the program starts? (The optimal solution is >to trap the message and deal with it from there.) Thanks for any help. >David Polansky (dp@cray.com) The answer is yes but... I'm doing this from memory, no docs with me, which is why I'm posting rather than mailing this reply, in th ehope that someone will fill in the details I have to leave out. At a certain MS-DOS release (3.2 I think) an IOCTL subfunction was added which would allow you to check if the current logical drive was the last one accessed (remember drive A: is always accessed at boot). Anyway this is exactly the function (DOS interrupt that is) that you want. Do the interrupt, get the result, then access the disk, or change the logical drive yourself, if you need too. This information I got from the excellent interrupt list available on SIMTEL20 INTER590 I think is the lastest. Best Regards, Derek Carr DEREK@DTS.INE.PHILIPS.NL Philips I&E TQV-5 Eindhoven, The Netherlands Standard Disclaimers apply.