WinLib.Utils.ShutdownBlock - charonn0/WinLib GitHub Wiki
##Method Signature Protected Function ShutdownBlock(Reason As String, OwnerWindow As Window = Nil) As Boolean
##Parameters
| Name | Type | Comment |
|---|---|---|
| Reason | String |
A human-readable reason for blocking system shutdown |
| OwnerWindow | Window |
The window that owns the block. (Optional) |
##Return value
Returns True on success.
##Notes
Blocks system shutdown for the specified reason. The user may override a block. This feature is available only on Windows Vista and newer. Does not block shutdowns not initiated by ShutdownInitiate.
OwnerWindow identifies the block, and there may be more than one block active at any given moment. If you do not pass a window then your application's frontmost window will be used (AKA Window(0).
##See also