[StructLayout(LayoutKind.Sequential)]
internal struct PROCESS_INFORMATION
{
public IntPtr hProcess;
public IntPtr hThread;
public int dwProcessId;
public int dwThreadId;
}
VB Signature:
Structure PROCESS_INFORMATION
Public hProcess As IntPtr
Public hThread As IntPtr
Public dwProcessId As Integer
Public dwThreadId As Integer
End Structure
User-Defined Types:
None.
Notes:
None.
Tips & Tricks:
The handle returned in the PROCESS_INFORMATION structure should be closed explicitly.
Sample Code:
Please add some!
Alternative Managed API:
Do you know one? Please contribute it!
Creates a new process, using the creditials supplied by hToken. The application opened is running under the credentials and authority for the user supplied to LogonUser.
10/1/2020 1:08:37 PM - -87.186.76.92
Starts a new process, opens an application in that process, and uses a passed UserID and Password. The application opened is running under the credentials and authority of the UserID passed.