char text[] = "something"; wchar_t wtext[20]; mbstowcs(wtext, text, strlen(text)+1);//Plus null LPWSTR ptr = wtext;