The opinions expressed herein are my own personal opinions. They are not necessarily fact or sactioned by any other person or organization. If you disagree that's your right. It's also my right to not care.
© Copyright 2008, Chris Tacke
Problem AI have an application that starts up a worker thread. I have code that properly kills that thread during normal shutdown, but if I'm debugging and stop the app, the thread keeps the app alive and I can't debug the app again without resetting teh device. What can the SDF do for me?
Problem BI have a CE device that is running a process without a window (console or otherwise) and I'd like to kill it. What can the SDF do for me?
SolutionThe solution to both is found in the OpenNETCF.ToolHelp.ProcessEntry class. Add this to an app and run it.
ProcessEntry[] currentProcesses = ProcessEntry.GetProcesses();foreach (ProcessEntry p in currentProcesses){ if (p.ExeFile.ToLower() == "MyAppName.exe".ToLower()) { p.Kill(); return; }}
Remember Me