Why are you using SDF instead of just making the call in your own code?
// Opens Today dialog on PocketPC to show item settings
using System;
using System.Runtime.InteropServices;
namespace Show_Today_Items_Settings{
public class ProcessInfo {
public System.Int32 hProcess;
public System.Int32 hThread;
public System.Int32 ProcessID;
public System.Int32 ThreadID;
}
class ShowTodayItemsSettings {
[DllImport("coredll.Dll")]
private static extern int CreateProcess(
string strImageName,
string strCmdLine,
IntPtr pProcessAttributes,
IntPtr pThreadAttributes ,
int bInheritsHandle,
int dwCreationFlags,
IntPtr pEnvironment,
IntPtr pCurrentDir,
Byte[] bArray,
ProcessInfo oProc);
private static void ShowItemsSettings(){
ProcessInfo pi = new ProcessInfo();
CreateProcess("ctlpnl", "cplmain.cpl,13,1", IntPtr.Zero, IntPtr.Zero, 0,
0, IntPtr.Zero, IntPtr.Zero, new Byte[128], pi);
}
public static void Main(string[] args){
ShowItemsSettings();
}
}
}
chad said:
Chris thanks for your response!
I have another question about deploying the dlls to the PDA. I'm trying
to use the OpenNETCF dll with the Diagnostics component. The function
i'm using is the Process.Start function to call an EXE.
The code build without errors, but does not call the EXE on the PDA
when I test it or throw errors. It just steps over the code as if it
was never there.
Example code:
String Scanner= "\\Application\\ScanWedge.exe";
Process.Start(startScanner);
Do you have any idea way this would happen?
Thanks!
Chad