Re: GetWinFileName



On May 6, 5:30 pm, battles <batt...@xxxxxxxxxxxxxx> wrote:
Thanks. I tried using this also without enuming through every
process, but I couldn't figure out how to setup the GetModuleFileName
statement with the handle that has been passed.


Given a window handle you should be able to get to the
filename with just:

GetWindowThreadProcessId
OpenProcess
GetModuleFileNameExA
CloseHandle

---
Geoff
.



Relevant Pages

  • Re: handles
    ... Your programs and DLLs which are running have one of these which ... Check things like GetModuleFilename() and ... Identifies a window. ... need one to draw on the printer and other devices. ...
    (microsoft.public.vc.language)
  • Getting the file name knowing a window handle
    ... I'm looking where to find the routine which can return the executable application filename when knowing the handle of the main window. ... GetModuleFilename doesn't apply under XP. ...
    (borland.public.delphi.nativeapi)