This is the mail archive of the
mailing list for the Cygwin project.
Calling opendir, readdir for empty removeable drive pops up SEM dialog
- To: Cygwin <cygwin at sources dot redhat dot com>
- Subject: Calling opendir, readdir for empty removeable drive pops up SEM dialog
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- Date: Thu, 30 Aug 2001 08:24:58 +1000 (EST)
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 */
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.
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