Created
July 1, 2015 02:00
-
-
Save DamonHao/a4b868414d1cfd8208f1 to your computer and use it in GitHub Desktop.
c++ convert char* to wchar*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| char* errorInfo = (char*) errorBuffer->GetBufferPointer(); | |
| const size_t cSize = strlen(errorInfo)+1; | |
| wchar_t* wc = new wchar_t[cSize]; | |
| size_t tmp = 0; | |
| mbstowcs_s(&tmp, wc, cSize, errorInfo, cSize); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment