-----Original Message-----
What I did was a DllImport for the CreateProcess() API from coredll.dll :
using System;
public class ProcessInfo
{
public IntPtr hProcess;
public IntPtr hThread;
public Int32 dwProcessId;
public Int32 dwThreadId;
}
public class Process
{
[System.Runtime.InteropServices.DllImport("coredll.dll",
SetLastError=true)]
private extern static int CreateProcess(
String imageName,
String cmdLine,
IntPtr lpProcessAttributes,
IntPtr lpThreadAttributes,
Int32 boolInheritHandles,
Int32 dwCreationFlags,
IntPtr lpEnvironment,
IntPtr lpszCurrentDir,
IntPtr si,
ProcessInfo pi);
public static bool CreateProcess(String ExeName, String CmdLine)
{
ProcessInfo pi = new ProcessInfo();
return CreateProcess(ExeName, CmdLine, IntPtr.Zero, IntPtr.Zero, 0, 0,
IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, pi) != 0;
}
}
This is the way I call the static method to, per esempio, start the notes
app to view a note:
Process.CreateProcess("\\Windows\\Notes",docFile);
-Dino
<Microsoft/>
Francesco said:
Hello people!
I have a little problem
I have to write a program wich execute an other executable
program on wince device.
wich Comman i have to use ?
(I program with vb.net 2003 and have a symbol pdt2800
device with pocket pc2000)
.