[comp.windows.ms.programmer] Check for drive ready.

jvl@idca.tds.PHILIPS.nl (J. van Loenen) (03/13/91)

Hi,

I'm writing a windows 3 program using a lot of data files. The user
may put the disks containing the files in any drive: floppy drive,
removable harddisk, optical disks etc. My program will search all
drives for the required data.

Problem: If the user puts his disk in some drive, he has to put disks
in all preceding drives too, otherwise windows will show a messagebox
"drive not ready, Retry/Cancel", and the user has to click "cancel"
many times, for each drive searched.

Now my question: is it possible to decide if a drive is ready, without
windows showing the messagebox?

As any media type may be used, the routine has to work for drives of
over 32Mb too.

Please respond by email.

Thanks in advance,
	Jan


###############################################################################
# DISCLAIMER:Unless otherwise stated, the above comments are entirely my own  #
#                                                                             #
#  Jan van Loenen                         Internet   jvl@idca.tds.philips.nl  #
#  Philips Information Systems            UUCP       ....!mcvax!philapd!jvl   #
###############################################################################

chrisg@microsoft.UUCP (Chris GUZAK) (03/15/91)

In article <1390@ssp18.idca.tds.philips.nl> jvl@idca.tds.PHILIPS.nl (J. van Loenen) writes:
>Problem: If the user puts his disk in some drive, he has to put disks
>in all preceding drives too, otherwise windows will show a messagebox
>"drive not ready, Retry/Cancel", and the user has to click "cancel"
>many times, for each drive searched.
>
>Now my question: is it possible to decide if a drive is ready, without
>windows showing the messagebox?

SetErrorMode(1) turns off windows int24 critical error handler.
use it!  (that means everyone)

Chris