Sign in to follow this  
Turold

Checking program path C++, Win32

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.)

Share this post


Link to post
Share on other sites
Wow, man! You impress me. You seem to know every little technical detail. So many ways to solve one little problem. Big thx :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this