Try this,
void main()
{
TCHAR buf[1024];
GetModuleFileName(NULL,buf,1024);
wprintf(_T("%s\n"),buf);
cout<<buf;
}
use are using Unicode Character Set :).
LPWCH is a pointer to a wide (two byte) character string.
char [1024] is an array of single byte characters