Current Program's Process ID

  • Thread starter Thread starter Steven Nagy
  • Start date Start date
S

Steven Nagy

Hi all,

How would I go about detecting the current applications Process ID?
I know I could do this by checking the EXE against the process list and
getting the ID, however I can't guarantee that there won't be another
process that isn't running with the exact same name. So I need another
way to get the Process ID.

Thanks in advance,
Steve
 
Hello Steven,

GetCurrentProcess to get Process instance and then call Process.ID

SN> Hi all,
SN>
SN> How would I go about detecting the current applications Process ID?
SN> I know I could do this by checking the EXE against the process list
SN> and
SN> getting the ID, however I can't guarantee that there won't be
SN> another
SN> process that isn't running with the exact same name. So I need
SN> another
SN> way to get the Process ID.
SN> Thanks in advance,
SN> Steve
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top