Finding application path with Windows API?

Started by
1 comment, last by I_Smell_Tuna 17 years, 1 month ago
Working on my game, obviously, but I'm not very familiar with the Windows API. Is there a function that is similar to using "App.Path" in VB that I can use for C++?
Advertisement
GetModuleFileName

    TCHAR szPath[MAX_PATH];         if( !GetModuleFileName( NULL, szPath, MAX_PATH ) )    {        printf("GetModuleFileName failed (%d)\n", GetLastError());         return FALSE;    }
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Cool, thanks.

This topic is closed to new replies.

Advertisement