Open
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.I agree to follow the Code of Conduct that this project adheres to.I have searched the issue tracker for a feature request that matches the one I want to file, without success.
(there was something like this but has been closed, i hope this will receive a new consideration)
Problem Description
OS : Windows
I would like a way to prevent windows sign out/shutdown until i finish/stop my running tasks.
Proposed Solution
Add the following functions
app.preventShutDown(reason)
When it is called the following should happen:
[ ] call the ShutdownBlockReasonCreate
API to prevent the shutdown.
[ ] all windows that receive the WM_QUERYENDSESSION
event should return false
app.releaseShutDown()
This function should call ShutdownBlockReasonDestroy
witch will allow the sign out/shutdown of windows.
Alternatives Considered
For now the method i use to achieve this result is using the node-ffi addon. But that is a complicated and not very efficient method.
Activity