Desktop Functions: Smart Device Functions:
|
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. C# Signature:[DllImport("kernel32.dll", SetLastError = true)] static extern bool CreateProcess(String imageName,
String cmdLine, VB Signature:
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 IntPtr) As Integer User-Defined Types:C#
public struct ProcessInfo 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(); IntPtr ptr_pi = Marshal.AllocHGlobal(Marshal.SizeOf(pi)); ; Marshal.StructureToPtr(pi, ptr_pi, true); byte[] si = new byte[128]; bool result = CreateProcess(openFileDialog1.FileName,
" ", Alternative Managed API:Do you know one? Please contribute it! Please edit this page!Do you have...
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). |
|