Skip to main content
gamedev.net
🔒 Locked

Finding application path with Windows API?

Started by I_Smell_Tuna 1 reply 900+ views
Original Post
I_Smell_Tuna
I_Smell_Tuna
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++?
LessBread
LessBread
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.