PFNSTATUSMESSAGECALLBACK callback function (userenv.h)

The StatusMessageCallback function is an application-defined callback function used to display status messages when applying policy. The PFNSTATUSMESSAGECALLBACK type defines a pointer to this callback function. StatusMessageCallback is a placeholder for the application-defined function name.

Syntax

PFNSTATUSMESSAGECALLBACK Pfnstatusmessagecallback;

DWORD Pfnstatusmessagecallback(
  [in] BOOL bVerbose,
  [in] LPWSTR lpMessage
)
{...}

Parameters

[in] bVerbose

Specifies whether the message is verbose. If this parameter is TRUE, the message is verbose. If this parameter is FALSE, the message is not verbose.

[in] lpMessage

Pointer to a buffer that contains the message string.

Return value

If the message was displayed successfully, return ERROR_SUCCESS. Otherwise, return a system error code.

Remarks

Pass a pointer to the StatusMessageCallback function when the system calls the ProcessGroupPolicy or the ProcessGroupPolicyEx callback function.

The status user interface has two modes: standard and verbose. Verbose messages are displayed only when the computer is in verbose mode. To enable verbose mode, set the following registry value to 1, log out, and log on. There is no need to restart the computer.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\VerboseStatus

Warning  Do not call the StatusMessageCallback function from a background thread because you may overwrite another thread's status message.
 

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header userenv.h

See also

Group Policy Functions

Group Policy Overview

ProcessGroupPolicy

ProcessGroupPolicyEx