This is the mail archive of the
mailing list for the Cygwin project.
RE: SetConsoleCtrlHandler problem
- From: "Hannu E K Nevalainen" <garbage_collector at telia dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 31 Dec 2003 15:37:20 +0100
- Subject: RE: SetConsoleCtrlHandler problem
> From: Michi Henning
> Sent: Wednesday, December 31, 2003 4:39 AM
> #include <Windows.h>
> #include <iostream>
> static BOOL handler(DWORD sig)
> std::cout << "handler called" << std::endl;
> return 1;
> int main()
> SetConsoleCtrlHandler((PHANDLER_ROUTINE)handler, true);
> return 0;
FWIW, my WAG, $0.02...
I'd expect this to be a bit dependent on whether you use the -mno-cygwin
flag or not... Or am I totally out in the blue here? (I'm curious, please
elaborate if you can!)
Michi, how *did you* compile it?
Your code looks as it should be compiled _with_ -mno-cygwin; not much POSIX
code as it seems to me. What happens if you feed this to cygwin1.dll/cygwin
runtime routines -> interference?
Using "-mno-cygwin" -> cygwin1.dll not involved -> expect more
"windows"-like or compatible handling of stuff like this.
/Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E
** on a mailing list; please keep replies on that particular list **
-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html