[BitBucket user: Alain Mazy]
[BitBucket date: 2017-05-20.10:06:25]
An executable can delay Windows shutdown by performing its cleanup while handling the WM_QUERYENDSESSION windows message (https://msdn.microsoft.com/en-us/library/windows/desktop/aa376890(v=vs.85).aspx). In our case, Orthanc.exe would have to handle this message correctly.
2 solutions to solve this issue:
- Orthanc.exe handles the WM_QUERYENDSESSION message -> we must implement windows message handling in Orthanc.exe
- Orthanc is included as a DLL inside the Orthanc Service and it will be shutdown correctly.
First solution is cleaner since that would also make sure shutdowns are handled correctly for Orthanc processes that are not started by a service. |