Click or drag to resize

LocalHookGetProcessIdByHandle Method

Tries to get the underlying process 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 GetProcessIdByHandle(
	IntPtr InProcessHandle
)

Parameters

InProcessHandle
Type: SystemIntPtr
A valid process handle.

Return Value

Type: Int32
A valid process ID associated with the given process handle.
Exceptions
ExceptionCondition
AccessViolationException The given handle was not opened with PROCESS_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 PROCESS_QUERY_INFORMATION access.
See Also