using System.Runtime.InteropServices;
[DllImport("coredll.Dll", EntryPoint="CreateProcess", SetLastError=true)]
extern static int CreateProcess(string strImageName, string strCmdLine, IntPtr pProcessAttributes,
IntPtr pThreadAttributes, int bInheritsHandle, int dwCreationFlags,
IntPtr pEnvironment, IntPtr pCurrentDir, IntPtr bArray, ProcessInfo oProc);
public class ProcessInfo
{
public Int32 hProcess;
public Int32 hThread;
public Int32 ProcessID;
public Int32 ThreadID;
}
private void button_Click(object sender, System.EventArgs e)
{
ProcessInfo pi = new ProcessInfo();
CreateProcess("//windows//iesample.exe",
"//HardDisk//Readme.htm", IntPtr.Zero,
IntPtr.Zero, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, pi);
}