char currentPath[_MAX_PATH];
wchar_t currentPath2[512];
- long result = GetModuleFileName(NULL, currentPath2, pathsize);
+ long result = GetModuleFileName(NULL, currentPath2, _MAX_PATH);
// GetModuleFileName(NULL, currentPath, _MAX_PATH);
int ret = wcstombs ( currentPath, currentPath2, sizeof(pname) );