[PATCH 2/2] wininet: Implement basic non-proxy authentiction.

Detlef Riekenberg wine.dev at web.de
Mon May 21 10:42:57 CDT 2007


On Mo, 2007-05-21 at 14:28 +0100, Robert Shearman wrote:

> +        int userlen = WideCharToMultiByte(CP_UTF8, 0,
> domain_and_username, lstrlenW(domain_and_username), NULL, 0, NULL,
> NULL);
> +        int passlen = WideCharToMultiByte(CP_UTF8, 0, password,
> lstrlenW(password), NULL, 0, NULL, NULL);

What is the advantage to use lstrlenW() here over -1, as used below?

> +
> +        WideCharToMultiByte(CP_UTF8, 0, domain_and_username, -1,
> auth_data, userlen, NULL, NULL);
> +        auth_data[userlen] = ':';
> +        WideCharToMultiByte(CP_UTF8, 0, password, -1,
> &auth_data[userlen+1], passlen, NULL, NULL);

Using -1 has the advantage to reduce the code-size.

Thanks.
 
-- 
 
By by ... Detlef





More information about the wine-devel mailing list