GetProcessId

[DllImport("Kernel32.dll")][return: MarshalAs(UnmanagedType.U4)]
public static extern uint GetProcessId(
   IntPtr Process
);

Microsoft documentation: Link

Last updated