User32AttachThreadInput Method

Attaches or detaches the input processing mechanism of one thread to that of another thread.

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", SetLastError = true)]
public static bool AttachThreadInput(
	int threadIdAttach,
	int threadIdAttachTo,
	bool attach
)

Parameters

threadIdAttach  Int32
The identifier of the thread to be attached to another thread.

The thread to be attached cannot be a system thread.

threadIdAttachTo  Int32
The identifier of the thread to which threadIdAttach will be attached. This thread cannot be a system thread.

A thread cannot attach to itself. Therefore, threadIdAttachTo cannot equal idAttach

attach  Boolean
If this parameter is , the two threads are attached.

If the parameter is , the threads are detached.

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.

Remarks

See Also