vb .net + WinAPI stopping a program

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
I'm using the WinAPI from opennetcf.org

I start a program like that
ProID = OpenNETCF.WinAPI.Core.ShellExecute("\windows\rda.exe", "1"

now I want to stop this program. I tried
OpenNETCF.WinAPI.Core.TerminateProcess(ProID, 0)

but it doesn't work. Can anybody help me? In the documentation there are no informations about that.

thank you!
 
Yes. "Cannot Terminate Process Error 6 (0x6)"
I also tried others functions of WinAPI like "OpenNETCF.Win32Window.SetForegroundWindow(ProID)" to bring the started program to front, but nothing happens...

thank you!

patric
 
Error 6 is 'The handle is invalid.' which explains why it doesn't work and
gives a pretty good place to start looking.

What does the hProcess look like?
--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


Patric said:
Yes. "Cannot Terminate Process Error 6 (0x6)"
I also tried others functions of WinAPI like
"OpenNETCF.Win32Window.SetForegroundWindow(ProID)" to bring the started
program to front, but nothing happens...
 
Back
Top