[StructLayout(LayoutKind.Sequential)]
public struct PROCESS_INFORMATION
{
public IntPtr hProcess;
public IntPtr hThread;
public uint dwProcessId;
public uint dwThreadId;
}
Structure PROCESS_INFORMATION
Public hProcess As IntPtr
Public hThread As IntPtr
Public dwProcessId As Integer
Public dwThreadId As Integer
End Structure
None.
Some APIs need an LPPROCESS_INFORMATION instead of just a PROCESS_INFORMATION. You can obtain that with code like the following:
PROCESS_INFORMATION procInfo = new PROCESS_INFORMATION();
GCHandle procInfoHandle = GCHandle.Alloc(procInfo, GCHandleType.Pinned);
try
{
IntPtr lpProcInfo = procInfoHandle.AddrOfPinnedObject();
// ... use the lpProcInfo as a LPPROCESS_INFORMATION ...
}
finally
{
procInfoHandle.Free();
}
Please add some!
Do you know one? Please contribute it!