in reply to Re: "background" perl processes on Win9X - how to avoid that "Perl - please close this application" on Windows Reboot/Logoff?
in thread "background" perl processes on Win9X - how to avoid that "Perl - please close this application" on Windows Reboot/Logoff?

In fact, I'm struggling with C wrapper now.. But it turns out that WM_QUERYENDSESSION is sent only to visible windows (only catching it on Win98+ allows to kill a child in time, without getting that "close application" dialog to appear); but I don't want any window to be visible (and an icon inside a tray is not acceptable either).. BTW, any hints how to make window to be visible from system POV, but invisible from user POV (e.g. offscreen windows or zero-sized windows?)
  • Comment on Re: Re: "background" perl processes on Win9X - how to avoid that "Perl - please close this application" on Windows Reboot/Logoff?

Replies are listed 'Best First'.
Re: Re: Re: "background" perl processes on Win9X - how to avoid that "Perl - please close this application" on Windows Reboot/Logoff?
by inman (Curate) on Apr 06, 2004 at 12:57 UTC
    From memory, the same messgae is sent to all windows on the system. You should beable to create an invisible window of 0x0 size using the CreateWindowEx API function. Your Perl App will need to add a message handler that responds to the appropriate messages.

    MSDN Article on Message Only Windows

Re: Re: Re: "background" perl processes on Win9X - how to avoid that "Perl - please close this application" on Windows Reboot/Logoff?
by EdwardG (Vicar) on Apr 06, 2004 at 13:35 UTC

    That doesn't sound right, I'm sure you can create an invisible window and still have it respond to WM_QUERYENDSESSION.

    Some Googling later...

    Message Only Windows

      And as for msg-only window, creating window with parent 0x84 on Win98 crashes the program (at least on the box I was testing it). May be it works for you due to some windows software updating your system .dlls (e.g. .NET framework, or office XP installation, or MSIE with latest security fixes).