Windows CE Task Manager Sample App
Windows CE 5.0 doesn’t have a full-featured Task Manager. The included Task Manager only lists processes with visible windows. I needed an app that could list Window-less tasks and let me kill the tasks. I did find an excellent application by Viktor Toth which has the same feature set as the XP/Win2k Task Manager, but the free version only lists process – it doesn’t let you kill a process. I am making available for download a binary that will let you both list processes and kill a process in Windows CE 5.0.
Then I found a tutorial on MSDN by Alex Yakhnin titled “Creating a Microsoft .NET Compact Framework-based Process Manager Application“. Alex has gone pretty in-depth in his Process class to expose process management features as a C# class. The tutorial has an associated MSI file that has the source code with a configured Visual Studio 2003 Solution. The project is configured for Pocket PC 2k3, but I was able to change the target platform with little effort and compile Alex’s code into a binary. You can download the compiled binary, CE Process Manager from this page.
You need to make sure you have .NET Compact Framework 2.0 installed on the CE machine you want to run ProcManCE.exe on. Visual Studio 2005 has the installation CAB file under the directory C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\wce500
Note: This is a .NET CF binary. It is not specific to any processor architecture. The .NET CF installation is processor architecture specific, but the app binary isn’t. So, as long as you have .NET CF 2.0 or higher installed on the WinCE device, you should be able to run this app.
Hi, currently I’m creating 2 applications (app A and B) for Windows Mobile 5.0 and using Compact Framework 2.0. App A is the main application and B is the sub application.
Below is the flow:
1. Start app A.
2. App A will start app B.
3. App B will do some process.
4. App B will kill app A.
5. App B will patch/upgrade app A. (ala update manager)
6. App B will restart app A.
7. App B will exit.
Now I’m stuck in killing app A. I did tried using OpenNETCF ProcessEntry Kill() function. When calling Kill(), it made the device crash.
I did tried using the SendMessage(hWnd, WM_CLOSE, 0, 0) funct where WM_CLOSE will have the ProcessEntry.ProcessID value and I didn’t assigned any value to hWnd variable. But it didn’t terminate app A. Did I assign the wrong value?
I also did tried using
Process.GetProcessById(processEntry.ProcessID).CloseMainWindow(), but failed as GetProcessById only accepts int32 value. Note that processEntry.ProcessID value is larger than int32 value.
Could you help me in killing app A through app B?
Thanks.
This might sound stupid, but why don’t you have App A start App B (step 2) and then have App A close itself?
So, in 2 (VB.Net syntax):
Process.Start(PathToAppB & “AppB.exe”, “Parameter 1”)
Me.Close()
If you start an app with the above command, that app will run independently from the starting app. Closing the creating app (say, A) will not terminate the new app (say, B).
Good luck.
Hi,
Do you have any idea to add in network monitor (Windows 32bit alike) inside the WinCE task manager?
I tried to use it for windows ce 6.0 R2, I saw all the processes but pressing on End Process did nothing.
How can i make it work?