Home | Info | Community | Development | myReactOS | Contact Us
[static]
Definition at line 300 of file url.c.
Referenced by WinHttpCreateUrl().
{ static const WCHAR formatW[] = {'%','u',0}; INTERNET_SCHEME scheme; *len = 0; if (uc->lpszScheme) { DWORD scheme_len = comp_length( uc->dwSchemeLength, 0, uc->lpszScheme ); *len += scheme_len; scheme = get_scheme( uc->lpszScheme, scheme_len ); } else { scheme = uc->nScheme; if (!scheme) scheme = INTERNET_SCHEME_HTTP; *len += strlenW( get_scheme_string( scheme ) ); } *len += 1; /* ':' */ if (uc->lpszHostName) *len += 2; /* "//" */ if (uc->lpszUserName) { *len += comp_length( uc->dwUserNameLength, 0, uc->lpszUserName ); *len += 1; /* "@" */ } else { if (uc->lpszPassword) { set_last_error( ERROR_INVALID_PARAMETER ); return FALSE; } } if (uc->lpszPassword) { *len += 1; /* ":" */ *len += comp_length( uc->dwPasswordLength, 0, uc->lpszPassword ); } if (uc->lpszHostName) { *len += comp_length( uc->dwHostNameLength, 0, uc->lpszHostName ); if (!uses_default_port( scheme, uc->nPort )) { WCHAR port[sizeof("65535")]; sprintfW( port, formatW, uc->nPort ); *len += strlenW( port ); *len += 1; /* ":" */ } if (uc->lpszUrlPath && *uc->lpszUrlPath != '/') *len += 1; /* '/' */ } if (uc->lpszUrlPath) *len += comp_length( uc->dwUrlPathLength, flags, uc->lpszUrlPath ); if (uc->lpszExtraInfo) *len += comp_length( uc->dwExtraInfoLength, flags, uc->lpszExtraInfo ); return TRUE; }