Sunday, February 1, 2009

[VC++] Getting your application's full file path name

For getting the path name to your application you can use GetModuleFileName() API. Below code snippet shows how to obtain the same and display the same in a messagebox !

TCHAR szModulePath[MAX_PATH];
GetModuleFileName( 0, szModulePath, MAX_PATH );
MessageBox( szModulePath );

No comments: