Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

Detecting windows shutdown event from background application c++ [duplicate]

$
0
0

I'm currently trying to detect a shutdown event from a background windows c++ application. This application is not a console app or service (no GUI etc) so I cannot use RegisterServiceCtrlHandlerEx or a console / window handler to detect WM_QUERYSHUTDOWN etc. I have tried creating a blank window just for the purpose of capturing the event but this is not an option for the application I'm building and it causes stability issues.

Any suggestions on how to do this would be helpful.

Edit:It's a background application to protect file directories. It's run on all of our developers PCs and it hooks winapi functions to protect certain directorys from the users as we can't simply rely on windows security to do it for us (as they have administrator privileges). The usermode process is set critical and we need a way to disable critical on shutdown to prevent BSOD. Its a simple winmain application with no window or gui. It just works in the background and interacts with the driver.

IF YOU DO NOT HAVE A SOLUTION DON'T WASTE UR TIME POSTING PLEASE...

This program cannot be a service as it would be too easy for anyone to stop or kill it. This program is designed to stop admin users tampering with certain directories and files. The program is working and finished, I just need a way to detect shutdown events without it being a service or having a window.


Viewing all articles
Browse latest Browse all 6334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>