The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: starzboy on May 16, 2009, 01:04:56 PM

Title: Skip Removable drive error
Post by: starzboy on May 16, 2009, 01:04:56 PM
Hello
I am trying to write a little code which will get the disk info of my removable drive which is a Floppy drive.
When there is a floppy in the drive, the function works well but when there is no floppy, i get an error - 'Windows - Drive not ready'.
how can i skip this error message when there is no floppy in the drive ?
Please help.
Title: Re: Skip Removable drive error
Post by: Vortex on May 16, 2009, 05:36:36 PM
How do you retrieve the status info of the floppy?
Title: Re: Skip Removable drive error
Post by: Mark Jones on May 16, 2009, 08:03:13 PM
Hi, maybe this is doing something like what you want: DriveWait / DW GUI

http://www.masm32.com/board/index.php?topic=5317.0
Title: Re: Skip Removable drive error
Post by: starzboy on May 16, 2009, 08:06:35 PM
@Vortex
I dont do any check to check status of floppy, i just use GetDriveType to identify the removable drive, and then createfile to access the files.
Should i do a status check ?
If yes then how ?

@Mark
Thanks for the help, i will look into it, maybe its of use to me.
Title: Re: Skip Removable drive error
Post by: Vortex on May 16, 2009, 08:08:33 PM
With retrieving the status, I meant getting disk info.
Title: Re: Skip Removable drive error
Post by: starzboy on May 16, 2009, 08:16:44 PM
@Vortex
I tried to calculate the free space etc, but the moment the code tries to access the disk i get the error message.
I try to use the SetErrorMode to supress the error and it works but the program lags, its just that the error dosent show.
What can be done about this ?
Please help.
Title: Re: Skip Removable drive error
Post by: farrier on May 16, 2009, 09:02:56 PM
starzboy,

Try:

http://www.masm32.com/board/index.php?topic=2240.msg17809#msg17809

hth,

farrier
Title: Re: Skip Removable drive error
Post by: starzboy on May 16, 2009, 09:10:55 PM
Hello
thanks for the help.
That is exactly what i had been using for the time being, but you see the program lags, the error does not show but the program lags, and i am using a timer so the program lags a lot, hope you understand.