I am working on a windows Desktop Server-Client application where client sends messages to server application via Signal-R and perform some FTP operation periodically. Can anyone suggest a way to detect windows shutdown trigger and wait until uploading a file to FTP server. Thanks in Advance.
Asked
Active
Viewed 96 times
1
-
You can use [`ShutdownBlockReasonCreate`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-shutdownblockreasoncreate) to block the ShoutDown proc, providing a reason for the delay as a message to the User. Sample (working) code [here](https://stackoverflow.com/a/58691726/7444103) – Jimi Feb 16 '20 at 18:58
-
Hi Jimi, Thanks for reply. Surely I will try your sample. – Maahi Feb 18 '20 at 10:03