CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 1999
    Posts
    1

    How to get app's starting directory

    How can I get application's starting directory?


  2. #2
    Guest

    Re: How to get app's starting directory


    CString GetExePath()
    {
    CString path;
    LPSTR buf = path.GetBuffer(_MAX_PATH);

    //Get exe path
    VERIFY(::GetModuleFileName(NULL, buf, _MAX_PATH));

    path.ReleaseBuffer();
    // path.MakeLower();

    return path.Left(path.ReverseFind('\\'));
    }






Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured