Skip to content

Instantly share code, notes, and snippets.

@kasajian
Created May 20, 2014 02:46
Show Gist options
  • Save kasajian/dd1cbf713d2d95c1e60f to your computer and use it in GitHub Desktop.
Save kasajian/dd1cbf713d2d95c1e60f to your computer and use it in GitHub Desktop.
Windows C++ / ATL way to: Convert ASCII to UNICODE
// My favorite way to convert from ASCII to UNICODE:
static_cast<LPCWSTR>(CComBSTR(static_cast<LPCWSTR>(_bstr_t(reinterpret_cast<const char*>( char*ascii_string_goes_here )))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment