Click or drag to resize

LocalHookGetThreadIdByHandle Method

Tries to get the underlying thread ID for a given handle.

Namespace:  EasyHook
Assembly:  EasyHook (in EasyHook.dll) Version: 2.7.6684.0 (2.7.6684.0)
Syntax
public static int GetThreadIdByHandle(
	IntPtr InThreadHandle
)

Parameters

InThreadHandle
Type: SystemIntPtr
A valid thread handle.

Return Value

Type: Int32
A valid thread ID associated with the given thread handle.
Exceptions
ExceptionCondition
AccessViolationException The given handle was not opened with THREAD_QUERY_INFORMATION access.
ArgumentException The handle is invalid.
NotSupportedException Should never occur and just notifies you that a handle to thread ID conversion is not available on the current platform.
Remarks
This is not always possible. The handle has to be opened with THREAD_QUERY_INFORMATION access.
See Also