|
From: Fredrik <fre...@ho...> - 2016-03-21 11:06:32
|
Hi. I have a problem that Windows doesn't wait for my service to shutdown cleanly when shutting down/restarting Windows (tested on Windows Server 2012 R2). Windows only waits a short amount of time before simply killing the service which results in an unclean shutdown. I've done some research that Windows sends SERVICE_CONTROL_PRESHUTDOWN control-code before shutting down the OS. Is it possible to get this control code via the wrapper or do you have any other suggestions as how to handle this case. I've also tried to set the "WaitToKillServiceTimeout" in the registry without any luck. Regards Fred |