How do you convert LPCWSTR to const char *?
Thanks
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.
You can also have a look at wcstombs_s
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With