Click here to Skip to main content
16,005,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCells in ADOMD VC++ Pin
Member 78113-Mar-00 7:43
Member 78113-Mar-00 7:43 
Generaldocument file Pin
septimiu12-Mar-00 22:01
septimiu12-Mar-00 22:01 
GeneralRE: document file Pin
Mike Dunn13-Mar-00 18:56
suss Mike Dunn13-Mar-00 18:56 
Generaladvanced ui Pin
Member 254412-Mar-00 10:39
Member 254412-Mar-00 10:39 
GeneralScrolling a dialog window in a tab control Pin
Brad11-Mar-00 18:35
Brad11-Mar-00 18:35 
GeneralApplication to Shell drag and drop Pin
Member 102011-Mar-00 3:17
Member 102011-Mar-00 3:17 
GeneralProcess Module Name Pin
Anonymous11-Mar-00 3:06
suss Anonymous11-Mar-00 3:06 
GeneralRE: Process Module Name Pin
Anonymous19-Mar-00 19:37
suss Anonymous19-Mar-00 19:37 
Here's something that may help:

Use CreateToolhelp32Snapshot to get a (handle) to
a snapshot of the processes etc., then traverse the
processes using Process32First and Process32Next
(using the handle returned by CreateToolhelp32Snapshot
and a PROCESSENTRY32 structure).

The PROCESSENTRY32 structure has a member called:
szExeFile
which will contain the path and filename of the
executable file for the process.

In your case, if you have a ProcessID, you could
compare it to the th32ProcessID member of the
PROCESSENTRY32 structure (or th32ParentProcessID)
to isolate the process you are after, and then use
the szExeFile member.


See 'Tool Help Library' in MSDN library, and go to
Using the Tool Help Functions -->
Taking a Snapshot and Viewing Processes

It appears that THL is Win 95/98/NT/2000 compliant.

Hope that helps.

==================
The original message was:

How can I get the file name of a module having an HWND or ProcessID. I need it in an Win95 application.
I can not use GetWindowsModuleFileName() because is not compatible on Win95.

Please help !
QuestionHow save content (DC) of a MCI window as a Cbitmap (Urgent)? Pin
Julian10-Mar-00 5:32
Julian10-Mar-00 5:32 
Generalclass for ftp client and server Pin
Anonymous9-Mar-00 21:14
suss Anonymous9-Mar-00 21:14 
GeneralRE: class for ftp client and server Pin
Alex Gorev10-Mar-00 5:36
Alex Gorev10-Mar-00 5:36 
GeneralResizing controls on the fly Pin
zenubis9-Mar-00 5:54
zenubis9-Mar-00 5:54 
GeneralRE: Resizing controls on the fly Pin
Mike Dunn9-Mar-00 7:08
Mike Dunn9-Mar-00 7:08 
GeneralRE: RE: Resizing controls on the fly Pin
Anonymous11-Mar-00 2:26
suss Anonymous11-Mar-00 2:26 
GeneralRE: RE: RE: Resizing controls on the fly Pin
nyon11-Mar-00 2:33
nyon11-Mar-00 2:33 
GeneralAldus Placeable Metafiles -> Enhanced Metafile problems. Pin
Thales P. Carvalho8-Mar-00 22:44
Thales P. Carvalho8-Mar-00 22:44 
Questionhow to make groupbox-title act like a button? Pin
Member 38508-Mar-00 22:28
Member 38508-Mar-00 22:28 
GeneralDocking window. Layout. NEED HELP!!! Pin
Anonymous8-Mar-00 21:31
suss Anonymous8-Mar-00 21:31 
GeneralRE: Docking window. Layout. NEED HELP!!! Pin
Anonymous11-Mar-00 6:43
suss Anonymous11-Mar-00 6:43 
GeneralCOM Arrays of arrays Pin
AJaeger7-Mar-00 23:31
AJaeger7-Mar-00 23:31 
GeneralRE: COM Arrays of arrays Pin
Alex Gorev9-Mar-00 11:54
Alex Gorev9-Mar-00 11:54 
QuestionHow to set focus to dialog controls Pin
Chris Vischer7-Mar-00 8:10
Chris Vischer7-Mar-00 8:10 
AnswerRE: How to set focus to dialog controls Pin
Member 44948-Mar-00 22:07
Member 44948-Mar-00 22:07 
Generalmicrophone Pin
Anonymous7-Mar-00 3:38
suss Anonymous7-Mar-00 3:38 
QuestionHow do I DCOM?... Pin
Kevin Moody5-Mar-00 17:44
Kevin Moody5-Mar-00 17:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.