[PATCH 3/3] mpr: Implement WNetUseConnectionA(). (try 4)
Alexandre Julliard
julliard at winehq.org
Fri Jan 22 02:58:22 CST 2016
Pierre Schweitzer <pierre at reactos.org> writes:
> + ret = WNetUseConnectionW(hwndOwner, pRes, passW, userIDW, dwFlags,
> + accessNameW, lpBufferSize, lpResult);
> + if (lpAccessName && lpBufferSize && *lpBufferSize && accessNameW)
> + {
> + len = WideCharToMultiByte(CP_ACP, 0, accessNameW, -1, NULL, 0, NULL, NULL);
> + if (len && len <= *lpBufferSize)
> + WideCharToMultiByte(CP_ACP, 0, accessNameW, -1, lpAccessName, len, NULL, NULL);
> + }
You need to handle failures, and a possibly different lpBufferSize for
the W function. It could also use some test cases, which would probably
require the W function to do something useful first.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list