Reputation: 6312
How do you convert LPCWSTR to const char *?
Thanks
Upvotes: 6
Views: 10681
Reputation: 994401
Use the WideCharToMultiByte
function.
Note that LPCWSTR
is the same as const wchar_t *
, so if you're dealing with wide character data throughout your application, you may not need to convert it at all.
Upvotes: 12