Checking program path C++, Win32
This function in VS2005 is superseded by GetModuleFileNameW, which returns wide chars. How can I use the orignal, with normal chars? If I can't, how can I easily convert wide chars to c chars?
Either go to your project settings, under general and change the character set from Unicode to multi-byte, explicitly use GetModuleFileNameA or you can use wcstombs() to translate wide characters to narrow characters. (Or if you feel like the C++ method, the narrow() member function of the ctype locale facet.)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement