ShutdownBlockReasonCreate (user32)
Last changed: -82.166.40.82

.
Summary
Indicates that the system cannot be shut down and sets a reason string to be displayed to the user if system shutdown is initiated.

C# Signature:

[DllImport("user32.dll", SetLastError=true)]
static extern bool ShutdownBlockReasonCreate(IntPtr hWnd, string reason);

VB Signature:

Declare Function ShutdownBlockReasonCreate Lib "user32.dll" (hWnd as IntPtr, reason As String) As Boolean

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Parameters:

hWnd - A handle to the main window of the application.

reason - The reason the application must block system shutdown.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation