Article View: borland.public.cppbuilder.nativeapi
Article #16054obtain the full path and filename for the executable file associated with a given process
From: Stefano Bonifazi
Date: Mon, 02 Jun 2003 08:08
Date: Mon, 02 Jun 2003 08:08
15 lines
1698 bytes
1698 bytes
Hello everybody! I would like to get the obtain the full path and filename for the executable file associated with a given process whose identifier I know... I found this on Borland Help: "To obtain the full path and filename for the executable file containing the process code, use the GetModuleFileName function." Well the first parameter of this function is: HMODULE hModule, // handle to module to find filename for I thought that could be the handle given by the OpenProcess function, but with that GetModuleFileName always fails... any idea how to get that hModule? Or if is there another way to get the "process' exe filename" ?? Thank You in advance! Stefano B.
Technical Details
Message-ID:
<3edb05ea$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,6b0bea3622ac4fd0,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-02 01:26:07 PST Reply-To: "Stefano Bonifazi" <stefboombastic@libero.it> From: "Stefano Bonifazi" <stefboombastic@libero.it> Newsgroups: borland.public.cppbuilder.nativeapi Subject: obtain the full path and filename for the executable file associated with a given process Date: Mon, 2 Jun 2003 10:08:10 +0200 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 151.24.132.18 Message-ID: <3edb05ea$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1054541290 151.24.132.18 (2 Jun 2003 01:08:10 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail