471,349 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

Getting the process ID

Does anyone know how to programmatically get the Process ID of a running
application in .Net? If so, could you share some code or point me to a
resource? Thanks!
Aug 9 '05 #1
1 4436
System.Diagnostics.Process.GetCurrentProcess().Id;
System.Diagnostics.Process.GetProcessesByName("MyP rocess")[0].Id;

In other words, check out "System.Diagnostics.Process" object.

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"CLEAR-RCIC" <CL*******@discussions.microsoft.com> wrote in message news:5B**********************************@microsof t.com...
Does anyone know how to programmatically get the Process ID of a running
application in .Net? If so, could you share some code or point me to a
resource? Thanks!

Aug 9 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

303 posts views Thread by mike420 | last post: by
reply views Thread by Srinivas | last post: by
33 posts views Thread by JamesB | last post: by
1 post views Thread by srinivasan srinivas | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.