[rt.cpan.org #53914] Bug report for Win32::API::Callback
Tue Sep 07 07:51:32 2010: Request 53914 was acted upon. Transaction: Correspondence added by ACALPINI Queue: Win32-API Subject: Bug report for Win32::API::Callback Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: perls...@mail.bg Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=53914 > my (wild enough) guess is that there is something different in the PHANDLER_ROUTINE (the callback SetConsoleCtrlHandler expects) from other working callbacks. Namely: BOOL WINAPI HandlerRoutine( __in DWORD dwCtrlType ); versus e.g.: BOOL CALLBACK EnumWindowsProc( __in HWND hwnd, __in LPARAM lParam ); the difference is the WINAPI instead of CALLBACK definition. I think it may have something to do with calling conventions and how parameters are pushed to the stack. this would man that callbacks defined in C as WINAPI are not supported, only those defined as CALLBACK are. but digging in the C headers to find the real difference between WINAPI and CALLBACK, or even adding support for different calling conventions in Win32::API::Callback is beyond my scope at the moment, sorry :-( cheers, Aldo
[rt.cpan.org #53914] Bug report for Win32::API::Callback
Tue Sep 07 07:04:22 2010: Request 53914 was acted upon. Transaction: Correspondence added by COSIMO Queue: Win32-API Subject: Bug report for Win32::API::Callback Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: perls...@mail.bg Status: new Ticket https://rt.cpan.org/Ticket/Display.html?id=53914 > On Fri Jan 22 06:26:39 2010, perls...@mail.bg wrote: > The error occurs when cb() routine is called, no matter whether it is > triggered through GenerateConsoleCtrlEvent call or via while(1){} and > Ctrl+C. Also specific implementation of cb() routine doesn't matter, > i.e. callback body can be just return 0 or return 1 - same effect (in > my implementation no file is created, so I assume that exception is > generated when OS try to call the callback). My personal opinion is > that $callback handler is not properly implemented. Hi Julian, sorry for the late reply. I have to admit I don't have too much time to debug this, but I also have no clue about what's going wrong. I guess you haven't found a way around your problem... -- Cosimo