Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than coredll, prefix the name with the module name and a period.
CreateProcess (coredll)
coredll is for smart devices, not desktop Windows. Therefore, this information only applies to code using the .NET Compact Framework. To see if information for CreateProcess in other DLLs exists, click on Find References to the right.
Declare Function CreateProcess Lib "coredll.dll" (ByVal imageName As String, ByVal cmdLine As String, ByVal lpProcessAttributes As IntPtr, ByVal lpThreadAttributes As IntPtr, ByVal boolInheritHandles As Int32, ByVal dwCreationFlags As Int32, ByVal lpEnvironment As IntPtr, ByVal lpszCurrentDir As IntPtr, ByVal si As Byte(), ByVal pi As ProcessInfo) As Integer
User-Defined Types:
C#
public class ProcessInfo
{
public IntPtr hProcess;
public IntPtr hThread;
public Int32 ProcessId;
public Int32 ThreadId;
}
VB
Public Class ProcessInfo
Public hProcess As IntPtr
Public hThread As IntPtr
Public ProcessId As Int32
Public ThreadId As Int32
End Class
Notes:
None.
Tips & Tricks:
You will need the above ProcessInfo class and may also want to use GetLastError and WaitForSingleObject. COMMENT: What about filling in "si.cb = sizeof(si);". No such code in the example.
Sample Code:
C# Sample usage:
ProcessInfo pi = new ProcessInfo();
byte [] si = new byte[128];
bool result = CreateProcess("calc.exe", "", IntPtr.Zero, IntPtr.Zero,0, false, IntPtr.Zero, IntPtr.Zero, si, pi);
VB Sample Usage:
Dim pi As New ProcessInfo
Dim si(128) As Byte
Dim result As Int32
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).