Kill process - OpenNETCF - fejl - pocket pc
Hej...jeg har et problem med at slå et program ned.
her er min kode håber der er nogle som kan hjælpe
--------------
Dim pi As New OpenNETCF.Diagnostics.Process
Dim psi As New OpenNETCF.Diagnostics.ProcessStartInfo
psi.WindowStyle = OpenNETCF.Diagnostics.ProcessWindowStyle.Maximized
psi.UseShellExecute = True
psi.FileName = "\Windows\mstsc40.exe"
psi.Arguments = "" '/command line switches if required
pi.Start(psi)
pi.Kill()
---------------
og her er den fejl jeg for
-------------
An unhandled exception of type 'System.InvalidOperationException' occurred in OpenNETCF.dll
Additional information: Handle invalid