-1

Possible Duplicate:
How to get all processes running in .net cf

I have a process called myprocess.exe. How can I know if this process is running in my smart device? On the device is installed Windows Mobile 6.1.

Community
  • 1
  • 1
Nick
  • 10,309
  • 21
  • 97
  • 201
  • At a guess, you're looking for [`Environment.OSVersion`](http://msdn.microsoft.com/en-us/library/system.environment.osversion.aspx) – millimoose Dec 09 '12 at 14:00
  • @millimoose No, it has nothing to do with what I'm asking, but if I'm wrong show me an example. – Nick Dec 09 '12 at 14:10
  • Oh, I thought you wanted to detect the current environment somehow. Didn't figure that `myprocess.exe` is some *other* process than the one you're working in. – millimoose Dec 09 '12 at 14:50
  • Also related: http://stackoverflow.com/questions/393881/p-invoking-createtoolhelp32snapshot-failing-in-compact-framework – ctacke Dec 10 '12 at 14:43
  • See also: http://stackoverflow.com/questions/7307998/how-to-kill-process-in-windows-ce – ctacke Dec 10 '12 at 14:44

2 Answers2

0

I have a google code project called cpumon2 at http://code.google.com/p/win-mobile-code/source/browse/#svn%2Ftrunk%2Fcpumon%2FProcessorUsage%2FCpuMon2

This shows how to build a running process list that can be used to search for a named process and you know then if it is running or not. The code uses reateToolhelp32Snapshot, see http://code.google.com/p/win-mobile-code/source/browse/trunk/cpumon/ProcessorUsage/CpuMon2/Process.cs

I cannot post the code here as it is split into several files (classes)

josef
  • 5,951
  • 1
  • 13
  • 24
-1

If you just want to visually verify whether or not your process is running, you can use the Remote Process Viewer that ships as part of VS2008 remote tools. I'm assuming your device is connected via ActiveSync or WMDC.

pdriegen
  • 2,019
  • 1
  • 13
  • 19