Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Processes - VB .net compact framework

Status
Not open for further replies.

jvolden

IS-IT--Management
Jan 26, 2005
77
0
0
US
Hello, very new to .net programming and looking for a little help with .net compact. We are are lloking for code to list all running processes by name on a Windows Mobile 5 phone (the Sprint PPC-6700). This is part of a larger utility program we are creating. The problem is all the examples we are finding uset System.Diagnostics.Debug > Process.Getprocesses(). This function is not working for us, Visual Studio states it is not part of Diagnostics.Debug.

We have working code using C#, but we need the code to be VB .net compact.

If any one could provide some code examples or links to a webpage it would be extremly appreciated.
 
You could try:

System.Diagnostics.Process.GetProcesses()


Hope this helps.

[vampire][bat]
 
Yes..... that is what we tried. I was looking at other code with the ."Debug" while typinng that before.

When using the System.Diagnostics.Process we get the error stating "GetProcesses is not a member of System.Diagnostics.Process"

We are using .Net compact Framework v.2
 
I've just had a look in help.

GetCurrentProcess
GetProcessByID

are supported, but

GetProcesses
GetProcessesByName

are not.

Crude but ...

Run a loop between 0 and int32.maxvalue (although you almost certainly would not need to go anywhere near that high) to retrieve the process info on each process using GetProcessByID


I'm sure someone can improve on this!

[vampire][bat]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top