public static int GetProcessIdFromHandle(Microsoft.Win32.SafeHandles.SafeProcessHandle processHandle) { if (!IsNt) { throw new PlatformNotSupportedException(SR.GetString("WinNTRequired")); } return(NtProcessManager.GetProcessIdFromHandle(processHandle)); }
/// <summary>Gets the ID of a process from a handle to the process.</summary> /// <param name="processHandle">The handle.</param> /// <returns>The process ID.</returns> public static int GetProcessIdFromHandle(SafeProcessHandle processHandle) { return(NtProcessManager.GetProcessIdFromHandle(processHandle)); }