Thread: Getting the executable-path from a window

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    76

    Getting the executable-path from a window

    Im trying to get the executable path from a program that is running. I can find the window handle with FindWindow, but now i dont know how to find the path from where the program is running. I saw an example program in msdn which searches all processes, but i dont really like to check all processes when i already got the handle to the window. Does anyone know a way to get the path from the executable from an OTHER program from which i have the handle?

    EDIT. i tried GetWindowModuleFileName but this return the name of my own program.
    Last edited by johny145; 06-02-2005 at 01:02 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  3. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  5. dont want to use all params
    By stallion in forum Windows Programming
    Replies: 2
    Last Post: 02-18-2003, 08:10 AM