Re: [PATCH 2/2] wininet: Implement basic non-proxy authentiction.
21 May
2007
21 May
'07
10:42 a.m.
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
6870
Age (days ago)
6870
Last active (days ago)
0 comments
1 participants
participants (1)
-
Detlef Riekenberg