winapi - How to write a program that stops the shutdown process by C? -


programs notepad can stop computer shutdown process when files not saved. how can write program stops shutdown process (in c)?

for windows vista , above there exists fuction defined in user32.dll (user32.lib) called "shutdownblockreasoncreate".
takes 2 parameters:
- handle of window
- string representing message displayed
if call succeeds application block windows shutting down.

powerful function , should not abused!


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -