Can't take credit for this, but google can. But here c# pinvoke example which could be converted to vb.net. As some sites suggest that System.Diagnostics.Process.Start is not in winCE but that may be dated info?
Code:
Duncan King
For anyone who's been following this (or has the same problem) -
here's the code that actually works:
public class Externals
{
[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,
byte [] si,
ProcessInfo pi );
[DllImport("CoreDll.dll")]
private extern static Int32 GetLastError();
private static bool CreateProc( String ExeName, String CmdLine,
ProcessInfo pi ) {
if ( pi == null )
pi = new ProcessInfo();
byte [] si = new byte[128];
return CreateProcess(ExeName, CmdLine, IntPtr.Zero, IntPtr.Zero, 0,
0, IntPtr.Zero, IntPtr.Zero, si, pi) != 0;
}
public static void LaunchIE() {
if(!CreateProc("iexplore.exe", "http://pocketpc.msn.co.uk";, null)) {
throw new Exception("Could not launch IE");
}
}
}
public class ProcessInfo {
public IntPtr hProcess;
public IntPtr hThread;
public Int32 ProcessId;
public Int32 ThreadId;
}