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
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.
Thanks, it worked.