Click to See Complete Forum and Search --> : Kill a process VB.NET 2008 Windows Mobile
jmztaylor
March 27th, 2010, 07:47 PM
I have VB.net 2008 with 3.5. I also have Windows Mobile 6 SDK and 6.5 SDK. I am having an issue killing an external process with my app. I have searched and tried numerous bits of code and none seem to work for Mobile. I keep seeing GetProcessByName but that is not an option for Windows Mobile. I know the process exe but the PID changes so I cannot hard code that. I cannot seem to get the code right to find the exe and kill it. Any help with this would be appreciated.
dglienna
March 28th, 2010, 09:31 AM
Have you tried this?
Dim instance As Process
instance.Kill()
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.kill.aspx
jmztaylor
March 28th, 2010, 05:08 PM
Have you tried this?
Dim instance As Process
instance.Kill()
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.kill.aspx
I guess the problem i have with that is how do i specify which process to kill?
dglienna
March 29th, 2010, 05:10 PM
I thought you knew that.
http://msdn.microsoft.com/en-us/library/z3w4xdc9%28v=VS.90%29.aspx
DataMiser
March 29th, 2010, 10:02 PM
The platforms mentioned in the link do not include versions of Windows CE or Windows mobile. I think the problem the OP is having is that this is not supported in the compact framework.
jmztaylor
March 29th, 2010, 11:51 PM
The platforms mentioned in the link do not include versions of Windows CE or Windows mobile. I think the problem the OP is having is that this is not supported in the compact framework.
This is correct. GetProcessByName does not work with Windows Mobile. I need an alternative to that to kill a certain process either by name or by finding the PID of the process and then killing it that way.
DataMiser
March 30th, 2010, 09:54 AM
Maybe this could be of use to you.
http://blog.xeviox.com/wordpress/?p=126
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.