I have looked at iczelions example and i think i have it right but doesnt seem to work.
What I'm trying to do is to intercept the message WM_QUERYENDSESSION
when it is sent to any app currently running. I'm Using the WH_CALLWNDPROC hookid, with a null value for the thread ID.
eg.
What I'm trying to do is to intercept the message WM_QUERYENDSESSION
when it is sent to any app currently running. I'm Using the WH_CALLWNDPROC hookid, with a null value for the thread ID.
eg.
invoke SetWindowsHookEx,WH_CALLWNDPROC,addr CallWndProc,hInstance,NULL
[\CODE]
but the problem is it doesnt seem to redirect all messages thru my hook procedure. only messages from my window that installs the hook. I am using the same method as the example with a DLL.
Thanks
Did you remember to make the datasections shared when you link?
David,
Yes it is shared....just not sure if this is the best way to check if a machine is attempting a reboot. and then to abort it.
Yes it is shared....just not sure if this is the best way to check if a machine is attempting a reboot. and then to abort it.
lol, i remember some times.. that i dont wanna my PC reboot, i open and reopen applications (explorer) and other and after this.. no reboot.. but is manually and only in Extreme situations... lol
Ok shot ill have a look into that, is this on win2k. I'd rather have a cleaner method to do it tho.
thanks for your input
thanks for your input