Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Get EXE Path API

Get EXE Path API

Scheduled Pinned Locked Moved C / C++ / MFC
jsonperformancequestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Axonn Echysttas
    wrote on last edited by
    #1

    Hi everybody... I know there was an API function that called from a process will return you the path to where the EXE that launched the process is located. If called from a DLL it would return the path to where the EXE that loaded the DLL is located and if called from an EXE it would return the path to the EXE. But I forgot how it was named and couldn't find it on quick Google / MSDN searches. Can you please refresh my memory? -= E C H Y S T T A S =- The Greater Mind Balance

    K 1 Reply Last reply
    0
    • A Axonn Echysttas

      Hi everybody... I know there was an API function that called from a process will return you the path to where the EXE that launched the process is located. If called from a DLL it would return the path to where the EXE that loaded the DLL is located and if called from an EXE it would return the path to the EXE. But I forgot how it was named and couldn't find it on quick Google / MSDN searches. Can you please refresh my memory? -= E C H Y S T T A S =- The Greater Mind Balance

      K Offline
      K Offline
      khan
      wrote on last edited by
      #2

      GetModuleFileName(...); this is this.

      A 1 Reply Last reply
      0
      • K khan

        GetModuleFileName(...); this is this.

        A Offline
        A Offline
        Axonn Echysttas
        wrote on last edited by
        #3

        Thank you! :- D. I remember now. -= E C H Y S T T A S =- The Greater Mind Balance

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups