ThreadExtensionsPostThreadMessage(Thread, WindowMessages, IntPtr, IntPtr) Method

Places (posts) a message to the message queue of the specified thread.

It returns without waiting for the thread to process the message.

Definition

Namespace: DevCase.Extensions.ThreadExtensions
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static bool PostThreadMessage(
	this Thread tr,
	WindowMessages msg,
	IntPtr wParam,
	IntPtr lParam
)

Parameters

tr  Thread
The source Thread.
msg  WindowMessages
The type of message to be posted.
wParam  IntPtr

[Missing <param name="wParam"/> documentation for "M:DevCase.Extensions.ThreadExtensions.ThreadExtensions.PostThreadMessage(System.Threading.Thread,DevCase.Win32.Enums.WindowMessages,System.IntPtr,System.IntPtr)"]

lParam  IntPtr

[Missing <param name="lParam"/> documentation for "M:DevCase.Extensions.ThreadExtensions.ThreadExtensions.PostThreadMessage(System.Threading.Thread,DevCase.Win32.Enums.WindowMessages,System.IntPtr,System.IntPtr)"]

Return Value

Boolean
If the function succeeds, the return value is .

If the function fails, the return value is .

To get extended error information, call GetLastWin32Error.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Thread. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also