User32GetWindowThreadProcessId(IntPtr, Int32) Method
Retrieves the identifier of the thread that created the specified window
and, optionally, the identifier of the process that created the window.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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 int GetWindowThreadProcessId(
IntPtr hWnd,
out int refPid
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function GetWindowThreadProcessId (
hWnd As IntPtr,
<OutAttribute> ByRef refPid As Integer
) As Integer
Dim hWnd As IntPtr
Dim refPid As Integer
Dim returnValue As Integer
returnValue = User32.GetWindowThreadProcessId(hWnd,
refPid)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static int GetWindowThreadProcessId(
IntPtr hWnd,
[OutAttribute] int% refPid
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member GetWindowThreadProcessId :
hWnd : IntPtr *
refPid : int byref -> int
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
A IntPtr handle to the window.
- refPid Int32
-
A pointer to a variable that receives the process identifier (PID).
If this parameter is not , GetWindowThreadProcessId(IntPtr, Int32) copies the identifier of
the process to the variable; otherwise, it does not.
Int32
The identifier of the thread that created the window.