How to get process full path

Hi All,

I have to find out the process full path through it’s
process ID. I used to do it through the
CreateToolHelpSapshot32(…) and then
ProcessFirst32(…) and so on. But as far as these
functions are not exported in NT4.0.

So my question: Do you know a way to find out full
path to a process’s image file through it’s process
ID?

I’m also interested in doing the same thing in may
driver? Any one has a clue??

thanks in advance

Johnny


Do You Yahoo!?
Gesendet von Yahoo! Mail - http://mail.yahoo.de


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

the process status API (PSAPI) can be used to retrieve process’ full path in
user mode. use GetModuleFileNameEx() function of psapi.

rgds,
seena

>>-----Original Message-----
>>From: Hamidreza Habibi [mailto:xxxxx@yahoo.de]
>>Sent: Wednesday, September 12, 2001 8:27 PM
>>To: NT Developers Interest List
>>Subject: [ntdev] How to get process full path
>>
>>
>>Hi All,
>>
>>I have to find out the process full path through it’s
>>process ID. I used to do it through the
>>CreateToolHelpSapshot32(…) and then
>>ProcessFirst32(…) and so on. But as far as these
>>functions are not exported in NT4.0.
>>
>>So my question: Do you know a way to find out full
>>path to a process’s image file through it’s process
>>ID?
>>
>>I’m also interested in doing the same thing in may
>>driver? Any one has a clue??
>>
>>
>>thanks in advance
>>
>>Johnny
>>
>>
>>__________________________________________________________________
>>Do You Yahoo!?
>>Gesendet von Yahoo! Mail - http://mail.yahoo.de
>>
>>—
>>You are currently subscribed to ntdev as: xxxxx@nestec.net
>>To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com