[PATCH 2/5] mpr: Implement provider selection given remote name.

Nikolay Sivov bunglehead at gmail.com
Tue Aug 2 07:13:51 CDT 2016


On 02.08.2016 14:31, Pierre Schweitzer wrote:
> +    len = WideCharToMultiByte(CP_ACP, 0, provider->lpProvider, -1, NULL, 0, NULL, NULL);
> +    provider_name = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
> +    if (provider_name)
> +        memcpy(provider_name, provider->lpProvider, len * sizeof(WCHAR));
> +
> +    HeapFree(GetProcessHeap(), 0, provider);
> +
> +    return provider_name;

This is confusing. WNetGetResourceInformationW return W string, you
convert it to A, and use A length to allocate another W buffer? What's
going on?



More information about the wine-devel mailing list