Skip to content
This repository was archived by the owner on Nov 26, 2022. It is now read-only.

WinLib.Utils.ShutdownBlock

Andrew edited this page Apr 4, 2014 · 5 revisions

#WinLib.Utils.ShutdownBlock

##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

Clone this wiki locally