Parameterübergabe bei Programmaufruf

Hallo - ich schon wieder,
ich möchte mit dem Compact Framework auf Win XP (oder 2000, etc.) aus dem C#-Programm eine URL im Browser aufrufen. Eigentlich weiß ich auch wie das geht, nur leider wird nur der Browser aufgerufen - die mitgelieferte URL wird scheinbar ignoriert. (Problem Parameterübergabe)

Wer sieht den Fehler? Oder wer kennt eine andere Variante?

Hier das Beispiel:


[DllImport(„kernel32.dll“)]

static extern bool CreateProcess(string lpApplicationName,string lpCommandLine, ref SECURITY_ATTRIBUTES lpProcessAttributes, ref SECURITY_ATTRIBUTES lpThreadAttributes, bool bInheritHandles,uint dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory,[In] ref STARTUPINFO lpStartupInfo,out PROCESS_INFORMATION lpProcessInformation);

// Internet Explorer starten (Übergabe URL)

public void StartIE(string webaddress) {
const uint NORMAL_PRIORITY_CLASS = 0x0020;
bool retValue;
string Application = „C://Programme/Internet Explorer/IEXPLORE.exe“;
string CommandLine = webaddress;

PROCESS_INFORMATION pInfo = new PROCESS_INFORMATION(); STARTUPINFO sInfo = new STARTUPINFO(); SECURITY_ATTRIBUTES pSec = new SECURITY_ATTRIBUTES(); SECURITY_ATTRIBUTES tSec = new SECURITY_ATTRIBUTES();

retValue = CreateProcess(Application,CommandLine,ref pSec,ref tSec,false,NORMAL_PRIORITY_CLASS,IntPtr.Zero,null,ref sInfo,out pInfo); }

Natürlich habe ich auch die „Structe“ eingebaut:


public struct SECURITY_ATTRIBUTES { public int nLength; public IntPtr lpSecurityDescriptor; public bool bInheritHandle; }

public struct STARTUPINFO { public uint cb; public IntPtr lpReserved; public IntPtr lpDesktop; public IntPtr lpTitle; public uint dwX; public uint dwY; public uint dwXSize; public uint dwYSize; public uint dwXCountChars; public uint dwYCountChars; public uint dwFillAttribute; public uint dwFlags; public ushort wShowWindow; public ushort cbReserved2; public IntPtr lpReserved2; public IntPtr hStdInput; public IntPtr hStdOutput; public IntPtr hStdError; }

public struct PROCESS_INFORMATION { public IntPtr hProcess; public IntPtr hThread; public uint dwProcessId; public uint dwThreadId; }

Hoffe jemand kann helfen,
Danke im voraus!

Gruß,
Beanpole

P.S. Bei Win CE (Einbindung coredll.dll) funktioniert es übrigens problemlos!