Home All Groups Group Topic Archive Search About

Current Program's Process ID

Author
10 Mar 2006 5:39 AM
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

Author
10 Mar 2006 5:51 AM
Michael Nemtsev
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
Are all your drivers up to date? click for free checkup

Author
10 Mar 2006 6:22 AM
Steven Nagy
Thanks, I can't believe I missed that method all together.

Bookmark and Share