Menu

Getting Full Path+ Exe Name to a string

2002-12-17
2012-09-26
  • Nobody/Anonymous

    Can anyone help me ? Im a newbie on the Win32 API, i need to get the full PATH+EXE Name to a string and set a opinter to it. What is the correct way of doing that?

     
    • upcase

      upcase - 2002-12-17

      Hi!
      Maybe try this:
      ...
      char szFileName[MAX_PATH];
      HINSTANCE hInstance = GetModuleHandle(NULL);
      GetModuleFileName(hInstance, szFileName, MAX_PATH);
      ...

      szFileName holds the Path & Filename with extension.
      Hope this helps a little..
      Bye!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.