I'm planning to develop a cross-platform application that may need to do processing prior to the user's Operating System shutting down or restarting. Is there a way to temporarily suspend, or override, an OS shutdown/restart in C++?
As an aside, this feature will be entirely the user's choice via configuration and disabled by default.
I feel this might not be possible without being invasive to the Operating System, but I thought I'd ask for the community's thoughts.
If my only option is to somewhat "hack" the OS in order to achieve this feature, then I'll not pursue this idea any further. :)
Thanks in advance!