This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Is there a way to avoid dialog boxes?
- To: Geoff Hart <ghart at siemens-psc dot com>
- Subject: Re: Is there a way to avoid dialog boxes?
- From: "John D. Rogers" <jrogers at cascadenet dot com>
- Date: Tue, 02 Jun 1998 08:22:18 -0400
- CC: gnu-win32 at cygnus dot com
- References: <001b01bd8d78$9eb4c180$834786a1@arch3.empros.com>
Geoff Hart wrote:
<stuff deleted>
> system error dialog boxes!
>
> Is there a way I can turn off error dialog boxes? Things like
> "cygwinb19.dll not found in PATH ....", or "an exception has
> occurred ...". These boxes popup on the NT server machine's
> screen, which doesn't help remote users.
>
Hi Geoff.
There is a fn called SetErrorMode. Prototype is as follows :
UINT
SetErrorMode(UINT uMode) // set of bit flags that specify
error-handling properties
The bitflags you're looking for are SEM_NOOPENFILEERRORBOX, which has a
value of 0x8000, and SEM_NOGPFAULTERRORBOX (0x0002). There are other
possible values, which can be determined by consulting any
reasonbly-complete API reference.
If you have the SEM_NOOPENFILEERRORBOX flag set when you call
SetErrorMode, you're telling the OS to return an error to you, and you
(i.e. your application) will handle it. Note that the documentation I
consulted (msvc 4.x), stated that with SEM_NOGPFAULTERRORBOX, the
application needed to be a debugger that is coded to handle such
exceptions via an exception-handling mechanism.
I hope you find this useful!
John D. Rogers
Software Engineer, Cascade Systems, Inc.
jrogers@cascadenet.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".