Use the API "GetModuleName". Here is an example:
PHP Code:#include <windows.h>
#include <iostream.h>
int main()
{
int x;
char filename[MAX_PATH];
GetModuleFileName(GetModuleHandle(NULL), filename, MAX_PATH);
cout<<filename;
cin>>x;
return 0;
}
|
Results 1 to 9 of 9
Thread: How to get Application Path?Threaded View
|
Click Here to Expand Forum to Full Width |