WM_SHUTDOWN notification Win32 dll
-
Hi, I have a dll that runs as a process via dllHost. My problem is i need to know when a Windows Shutdown event is being fired. I've never had this problem before because all my apps have a main window and receive this notification. However the dll just keeps working and terminates in an undetermined state. I can't have the dll called from an app. I have no alternative but to use what i've got. how can i register to receive a WM_SHUTDOWN event from my dll? :wtf: Please don't suggest i change the design of the solution. I'm confined to what i have. thanks in advance Carl
-
Hi, I have a dll that runs as a process via dllHost. My problem is i need to know when a Windows Shutdown event is being fired. I've never had this problem before because all my apps have a main window and receive this notification. However the dll just keeps working and terminates in an undetermined state. I can't have the dll called from an app. I have no alternative but to use what i've got. how can i register to receive a WM_SHUTDOWN event from my dll? :wtf: Please don't suggest i change the design of the solution. I'm confined to what i have. thanks in advance Carl
-
Hi, I have a dll that runs as a process via dllHost. My problem is i need to know when a Windows Shutdown event is being fired. I've never had this problem before because all my apps have a main window and receive this notification. However the dll just keeps working and terminates in an undetermined state. I can't have the dll called from an app. I have no alternative but to use what i've got. how can i register to receive a WM_SHUTDOWN event from my dll? :wtf: Please don't suggest i change the design of the solution. I'm confined to what i have. thanks in advance Carl
Yes instead though create a custom message In both headers: #define MY_MESSAGE (WM_USER+22) Then trap it in defwinpro "Naked we come and bruised we go." - James Douglas Morrison Best Wishes, ez_way
-
Yes instead though create a custom message In both headers: #define MY_MESSAGE (WM_USER+22) Then trap it in defwinpro "Naked we come and bruised we go." - James Douglas Morrison Best Wishes, ez_way
I only have one binary, the dll. Hence only one header. I am running the dll as an application, through another process.
-
What about a creating an invisible hidden window for just receiving this message (under W2K+ you can use message only windows designed specially for these purposes - see
HWND_MESSAGE
for details)thanks for the comment but firstly this needs to be a solution to all current windows platforms (excluding servers) and secondly i'm sure there must be a way to register for this event, even in a dll. hmmm Regards Carl
-
I only have one binary, the dll. Hence only one header. I am running the dll as an application, through another process.
OK sorry, did your try force parm? BOOL x = ExitWindowsEx(EWX_FORCE,NULL); "Naked we come and bruised we go." - James Douglas Morrison Best Wishes, ez_way