A
academic
This is from something I wrote 15 years ago.
Haven't use c since then
Wanted to use it now so I cut and pasted into VS2005 on WinXP
Now I can't seem to get the types OK
GetModuleFileName requires LPWCH for szModulePath
What are the compatible types??
Thanks
char szModulePath[SIZE_OF_PATH];
GetModuleFileName(happThisInstance, szModulePath, sizeof(szModulePath));
//Remove the FileName from the full pathname
PSTR pstr = szModulePath + lstrlen(szModulePath) - 1;
//note: '\\' is the character \ The first \ is a c language escape character
while ((*pstr != '\\') && (*pstr != ':') && (pstr >= szModulePath)) pstr--;
pstr++;
*pstr=(char)0;
Haven't use c since then
Wanted to use it now so I cut and pasted into VS2005 on WinXP
Now I can't seem to get the types OK
GetModuleFileName requires LPWCH for szModulePath
What are the compatible types??
Thanks
char szModulePath[SIZE_OF_PATH];
GetModuleFileName(happThisInstance, szModulePath, sizeof(szModulePath));
//Remove the FileName from the full pathname
PSTR pstr = szModulePath + lstrlen(szModulePath) - 1;
//note: '\\' is the character \ The first \ is a c language escape character
while ((*pstr != '\\') && (*pstr != ':') && (pstr >= szModulePath)) pstr--;
pstr++;
*pstr=(char)0;