odbccp32: Implement SQLGetPrivateProfileString ( try 2)
Alexandre Julliard
julliard at winehq.org
Thu Jun 11 05:32:46 CDT 2015
Alistair Leslie-Hughes <leslie_alistair at hotmail.com> writes:
> @@ -101,6 +102,21 @@ static inline WCHAR *heap_strdupAtoW(const char *str)
> return ret;
> }
>
> +static char *WtoA(LPCWSTR wstr)
> +{
> + int length;
> + char *result;
> +
> + length = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
> +
> + result = HeapAlloc(GetProcessHeap(), 0, length);
> +
> + if (result)
> + WideCharToMultiByte(CP_UTF8, 0, wstr, -1, result, length, NULL, NULL);
> +
> + return result;
UTF-8 makes no sense here, and you shouldn't need that function in the
first place.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list