Maps a narrow string to a wide string via a specific code page
Syntax
HRESULT WINAPI SHAnsiToUnicodeCPAlloc (
UINT codePage,
LPCSTR pszString,
LPWSTR* ppwszConverted
)
Parameters
- codePage
- The codepage to use in the call to MultiByteToWideChar
- pszString
- The string to be widened
- ppwszConverted
- A pointer to a pointer that receives the widened string. The returned pointer must be freed with CoTaskMemFree when it is no longer needed.
Return Value
S_OK on success, E_OUTOFMEORY or HRESULT_FROM_WIN32(GetLastError()) on failure
Remarks
This function is also known as _SHAnsiToUnicodeCPAlloc@12.