dp@hemlock.cray.com (David Polansky) (02/14/91)
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)
derek@sun4dts.dts.ine.philips.nl (derek) (02/15/91)
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.
jnelson@plains.NoDak.edu (Jim Nelson) (02/16/91)
In article <090905.3866@timbuk.cray.com> 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. Check the Bios Equipment Word. I'm not sure of it's exact location, but Turbo C has a function called biosequip that will grab it for you. If your not using C, grab any good book on DOS. -- .sig? What .sig? Ohhhh, *THIS* .sig. Jim, in the Land of the Lost. disclaimer: These are just opinions. If you want 'em, you can have 'em.
juseppala@cc.helsinki.fi (02/25/91)
In article <666@sun4dts.dts.ine.philips.nl>, derek@sun4dts.dts.ine.philips.nl (derek) writes: > 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. Interrupt 21h, function 440Eh. AH = 44h, AL = 0E, BL = drive number to be inquired. Returns the last used drive number in AL. I think this is the contents of address 0040:0104. -- Terv. Juha I. Sepp{l{ Oikokatu 15 B 26 / INTERNET: juseppala@cc.helsinki.fi 00170 Helsinki 17 / EARN: juseppal@finuh.bitnet tel. +358 0 1355690 / ARPA: juseppal%finuh@cunyvm.cuny.EDU