News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

No error message displayed

Started by skywalker, May 03, 2007, 01:27:20 AM

Previous topic - Next topic

skywalker

How do I get this to not show an error message when there is no disk in the drive.
I can't find  0000000F returned  in any register either.

Thanks.

  File1 db "a:\", 0 ; file names are case sensitive

.code

start:

main proc

    LOCAL buffer[260]:BYTE
    invoke GetCL,1,ADDR buffer
invoke GetFileAttributes,offset File1
       

sinsi

    invoke SetErrorMode,SEM_FAILCRITICALERRORS

CreateFile and GetVolumeInformation both say basically the same thing:
QuoteWhen a user attempts to get information about a floppy drive that does not have a floppy disk, or a CD-ROM drive that does not have a compact disc, the system displays a message box for the user to insert a floppy disk or a compact disc, respectively. To prevent the system from displaying this message box, call the SetErrorMode function with SEM_FAILCRITICALERRORS.
I would assume it works the same for GetFileAttributes.
Light travels faster than sound, that's why some people seem bright until you hear them.

skywalker