Search code examples
winapimessage

Is it possible to send WM_QUERYENDSESSION messages to a window in a different process?


I want to debug a windows C++ application I've written to see why it isn't responding to WM_QUERYENDSESSION how I expect it to. Clearly it's a little tricky to do this by just shutting the system down. Is there any utility or code which I can use to send a fake WM_QUERYENDSESSION to my application windows myself?


Solution

  • I've used the Win32::GuiTest Perl module to do this kind of thing in the past.