SHRestrictedMessageBox

This function displays a standard message box to complain of a conflict with some restriction.

Declaration

int SHRestrictedMessageBox (HWND hWnd);

Parameters

The hWnd argument provides a handle to the window that should own the message box, or is NULL.

Return Value

The function returns the result from the message box. Refer to documentation of the standard API function named MessageBox.

Behaviour

The function displays a message box, with an error icon and an OK button, with text loaded from the SHLWAPI resources. Currently, the text is from string resource 283 and reads (in U.S. releases)

This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.

If the hWnd argument is NULL, the caption also is loaded from the SHLWAPI resources. Currently, the caption is from string resource 284 and reads (in U.S. releases)

Restrictions

If the hWnd argument is not NULL, the caption is taken from the given window.

Availability

The SHRestrictedMessageBox function is exported from SHLWAPI as ordinal 384 in late builds of version 5.00 and in all versions since. It is seen in build 2920 and higher. Build 2614 and earlier known builds of version 5.00 certainly do not export this function, and have ordinal 384 assigned incidentally to the named export AssocQueryStringW.

Though the function was introduced with Windows 2000 as long ago as October 1999, it was still not documented by Microsoft in the MSDN Library at least as late as the CD edition dated January 2004.