Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

PROCESS_INFORMATION (Structures)
 
.
Summary
Used with CreateProcess, CreateProcessAsUser, and CreateProcessWithLogonW to specify the window station, desktop, standard handles, and appearance of the main window for the new process.

C# Definition:

[StructLayout(LayoutKind.Sequential)]
public struct PROCESS_INFORMATION
{
   public IntPtr hProcess;
   public IntPtr hThread;
   public uint dwProcessId;
   public uint dwThreadId;
}

VB Definition:

Structure PROCESS_INFORMATION
   Public hProcess As IntPtr
   Public hThread As IntPtr
   Public dwProcessId As Integer
   Public dwThreadId As Integer
End Structure

Notes:

None.

Tips & Tricks:

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();

}

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation
STARTUPINFO on MSDN

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Find References
Show Printable Version
Revisions