User32RegisterWindowMessage Method

Defines a new window message that is guaranteed to be unique throughout the system.

The message value can be used when sending or posting messages.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static uint RegisterWindowMessage(
	string name
)

Parameters

name  String
The name of the new message to be registered.

Return Value

UInt32
If the message is successfully registered, the return value is a message identifier in the range 0xC000 through 0xFFFF.

If the function fails, the return value is 0.

To get extended error information, call GetLastWin32Error.

Remarks

See Also