This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Calling opendir, readdir for empty removeable drive pops up SEM dialog


 
 Calling opendir or readdir on empty floppy or CD drive causes the SEM
dialog box (No disk in drive..Abort/Retry/Ignore) to pop up.  Trying to
get the Ignore button to work eventually cause seg fault.

A workaround is to bracket calls to these functions with
SetErrorMode((SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX)); /*
disable SEM */
and

SetErrorMode(0) /*  enable */

This effectively presses Ignore for you without the SEM dialog: 
GetLastError returns 21 (ERROR_NOT_READY) which is what the Ignore
reponse should do.


Danny

http://travel.yahoo.com.au - Yahoo! Travel
- Got Itchy feet? Get inspired!

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]