Calling opendir, readdir for empty removeable drive pops up SEM dialog
Danny Smith
danny_r_smith_2001@yahoo.co.nz
Wed Aug 29 15:24:00 GMT 2001
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/
More information about the Cygwin
mailing list