Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WCHAR char2WCHAR( const char* in )
- {
- const int needed = mbstowcs( 0, in, strlen( in ) +1 );
- WCHAR* out = malloc( sizeof( wchar_t ) *needed +1 );
- mbstowcs( out, in, strlen( in ) +1 );
- WCHAR _out = *out;
- free( out );
- return _out;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement