PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
getting running processes
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
getting running processes
![]() |
getting running processes |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I'm trying to get running process on an iPaq 2490 using vb code through vs2005.
I was expecting something like for i = 1 to totalProcesses arrayProcess(i) = getProcessBy ID(i) if arrayProcess(i).startinfo.processName = "Terminal Services Client" then msgBox("Bingo") end if next Of course this doesn't work, but how can I achieve the desired effect. Thanks in advance |
|
|
|
#2 |
|
Guest
Posts: n/a
|
There's a toolhelp wrapper in OpenNETCF that will allow you to enumerate
processes. The process name won't be something as clear as that, of course, but you can check the EXE name. The namespace is OpenNETCF.ToolHelp. You'll call ProcessEntry.GetProcesses(), and then loop through the array of items that it creates for you. Paul T. "BOPMKR" <BOPMKR@discussions.microsoft.com> wrote in message news:91067587-18F6-454B-AAAA-B3B6F88D830E@microsoft.com... > I'm trying to get running process on an iPaq 2490 using vb code through > vs2005. > > I was expecting something like > > for i = 1 to totalProcesses > > arrayProcess(i) = getProcessBy ID(i) > > if arrayProcess(i).startinfo.processName = "Terminal Services Client" > then > > msgBox("Bingo") > > end if > next > > Of course this doesn't work, but how can I achieve the desired effect. > > Thanks in advance |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thanks.
"Paul G. Tobey [eMVP]" wrote: > There's a toolhelp wrapper in OpenNETCF that will allow you to enumerate > processes. The process name won't be something as clear as that, of course, > but you can check the EXE name. The namespace is OpenNETCF.ToolHelp. > You'll call ProcessEntry.GetProcesses(), and then loop through the array of > items that it creates for you. > > Paul T. > > "BOPMKR" <BOPMKR@discussions.microsoft.com> wrote in message > news:91067587-18F6-454B-AAAA-B3B6F88D830E@microsoft.com... > > I'm trying to get running process on an iPaq 2490 using vb code through > > vs2005. > > > > I was expecting something like > > > > for i = 1 to totalProcesses > > > > arrayProcess(i) = getProcessBy ID(i) > > > > if arrayProcess(i).startinfo.processName = "Terminal Services Client" > > then > > > > msgBox("Bingo") > > > > end if > > next > > > > Of course this doesn't work, but how can I achieve the desired effect. > > > > Thanks in advance > > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
OK I found the process ("mstsc40.exe") now how do I kill it? -which will help
me to initialize to a known state? Thanks in advance Bryan "Paul G. Tobey [eMVP]" wrote: > There's a toolhelp wrapper in OpenNETCF that will allow you to enumerate > processes. The process name won't be something as clear as that, of course, > but you can check the EXE name. The namespace is OpenNETCF.ToolHelp. > You'll call ProcessEntry.GetProcesses(), and then loop through the array of > items that it creates for you. > > Paul T. > > "BOPMKR" <BOPMKR@discussions.microsoft.com> wrote in message > news:91067587-18F6-454B-AAAA-B3B6F88D830E@microsoft.com... > > I'm trying to get running process on an iPaq 2490 using vb code through > > vs2005. > > > > I was expecting something like > > > > for i = 1 to totalProcesses > > > > arrayProcess(i) = getProcessBy ID(i) > > > > if arrayProcess(i).startinfo.processName = "Terminal Services Client" > > then > > > > msgBox("Bingo") > > > > end if > > next > > > > Of course this doesn't work, but how can I achieve the desired effect. > > > > Thanks in advance > > > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Answered in the separate thread which you created for some reason. There's
a Kill() method, as a last resort. Paul T. "BOPMKR" <BOPMKR@discussions.microsoft.com> wrote in message news 8BF1F85-8DC7-4C84-9B52-7A6E2B28E1C3@microsoft.com...> OK I found the process ("mstsc40.exe") now how do I kill it? -which will > help > me to initialize to a known state? > > Thanks in advance > Bryan > > "Paul G. Tobey [eMVP]" wrote: > >> There's a toolhelp wrapper in OpenNETCF that will allow you to enumerate >> processes. The process name won't be something as clear as that, of >> course, >> but you can check the EXE name. The namespace is OpenNETCF.ToolHelp. >> You'll call ProcessEntry.GetProcesses(), and then loop through the array >> of >> items that it creates for you. >> >> Paul T. >> >> "BOPMKR" <BOPMKR@discussions.microsoft.com> wrote in message >> news:91067587-18F6-454B-AAAA-B3B6F88D830E@microsoft.com... >> > I'm trying to get running process on an iPaq 2490 using vb code through >> > vs2005. >> > >> > I was expecting something like >> > >> > for i = 1 to totalProcesses >> > >> > arrayProcess(i) = getProcessBy ID(i) >> > >> > if arrayProcess(i).startinfo.processName = "Terminal Services Client" >> > then >> > >> > msgBox("Bingo") >> > >> > end if >> > next >> > >> > Of course this doesn't work, but how can I achieve the desired effect. >> > >> > Thanks in advance >> >> >> |
|
|
|
#6 |
|
Guest
Posts: n/a
|
Sorry I thought that because it was actually another question it would be
ignored here because this dealt with locating the process. I'll be more careful in future. Thanks for responding "Paul G. Tobey [eMVP]" wrote: > Answered in the separate thread which you created for some reason. There's > a Kill() method, as a last resort. > > Paul T. > > "BOPMKR" <BOPMKR@discussions.microsoft.com> wrote in message > news 8BF1F85-8DC7-4C84-9B52-7A6E2B28E1C3@microsoft.com...> > OK I found the process ("mstsc40.exe") now how do I kill it? -which will > > help > > me to initialize to a known state? > > > > Thanks in advance > > Bryan > > > > "Paul G. Tobey [eMVP]" wrote: > > > >> There's a toolhelp wrapper in OpenNETCF that will allow you to enumerate > >> processes. The process name won't be something as clear as that, of > >> course, > >> but you can check the EXE name. The namespace is OpenNETCF.ToolHelp. > >> You'll call ProcessEntry.GetProcesses(), and then loop through the array > >> of > >> items that it creates for you. > >> > >> Paul T. > >> > >> "BOPMKR" <BOPMKR@discussions.microsoft.com> wrote in message > >> news:91067587-18F6-454B-AAAA-B3B6F88D830E@microsoft.com... > >> > I'm trying to get running process on an iPaq 2490 using vb code through > >> > vs2005. > >> > > >> > I was expecting something like > >> > > >> > for i = 1 to totalProcesses > >> > > >> > arrayProcess(i) = getProcessBy ID(i) > >> > > >> > if arrayProcess(i).startinfo.processName = "Terminal Services Client" > >> > then > >> > > >> > msgBox("Bingo") > >> > > >> > end if > >> > next > >> > > >> > Of course this doesn't work, but how can I achieve the desired effect. > >> > > >> > Thanks in advance > >> > >> > >> > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

8BF1F85-8DC7-4C84-9B52-7A6E2B28E1C3@microsoft.com...
