31#define URI_DISPLAY_NO_ABSOLUTE_URI 0x1
32#define URI_DISPLAY_NO_DEFAULT_PORT_AUTH 0x2
34#define ALLOW_NULL_TERM_SCHEME 0x01
35#define ALLOW_NULL_TERM_USER_NAME 0x02
36#define ALLOW_NULL_TERM_PASSWORD 0x04
37#define ALLOW_BRACKETLESS_IP_LITERAL 0x08
38#define SKIP_IP_FUTURE_CHECK 0x10
39#define IGNORE_PORT_DELIMITER 0x20
41#define RAW_URI_FORCE_PORT_DISP 0x1
42#define RAW_URI_CONVERT_TO_DOS_PATH 0x2
44#define COMBINE_URI_FORCE_FLAG_USE 0x1
48static const IID IID_IUriObj = {0x4b364760,0x9f51,0x11df,{0x98,0x1c,0x08,0x00,0x20,0x0c,0x9a,0x66}};
215 {
URL_SCHEME_JAVASCRIPT, {
'j',
'a',
'v',
'a',
's',
'c',
'r',
'i',
'p',
't',0}},
216 {
URL_SCHEME_VBSCRIPT, {
'v',
'b',
's',
'c',
'r',
'i',
'p',
't',0}},
219 {
URL_SCHEME_MSSHELLROOTED, {
'm',
's',
'-',
's',
'h',
'e',
'l',
'l',
'-',
'r',
'o',
'o',
't',
'e',
'd',0}},
220 {
URL_SCHEME_MSSHELLIDLIST, {
'm',
's',
'-',
's',
'h',
'e',
'l',
'l',
'-',
'i',
'd',
'l',
'i',
's',
't',0}},
264 return ((
val >=
'a' &&
val <=
'z') || (
val >=
'A' &&
val <=
'Z'));
268 return (
val >=
'0' &&
val <=
'9');
276 return (
str[0] ==
'\\' &&
str[1] ==
'\\');
280 return (
val ==
'>' ||
val ==
'<' ||
val ==
'\"');
312 val ==
'_' ||
val ==
'~');
319 return (
val ==
'!' ||
val ==
'$' ||
val ==
'&' ||
320 val ==
'\'' ||
val ==
'(' ||
val ==
')' ||
321 val ==
'*' ||
val ==
'+' ||
val ==
',' ||
322 val ==
';' ||
val ==
'=');
327 return (
val ==
':' ||
val ==
'/' ||
val ==
'?' ||
328 val ==
'#' ||
val ==
'[' ||
val ==
']' ||
337 return (
val ==
'#' ||
val ==
'/' ||
val ==
'?' ||
338 val ==
'\0' || (acceptSlash &&
val ==
'\\'));
347 return ((
val >=
'a' &&
val <=
'f') ||
348 (
val >=
'A' &&
val <=
'F') ||
349 (
val >=
'0' &&
val <=
'9'));
358 return c ==
'/' ||
c ==
'\\';
388 return((
flags & Uri_CREATE_DECODE_EXTRA_INFO &&
flags & Uri_CREATE_NO_DECODE_EXTRA_INFO) ||
389 (
flags & Uri_CREATE_CANONICALIZE &&
flags & Uri_CREATE_NO_CANONICALIZE) ||
390 (
flags & Uri_CREATE_CRACK_UNKNOWN_SCHEMES &&
flags & Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES) ||
391 (
flags & Uri_CREATE_PRE_PROCESS_HTML_URI &&
flags & Uri_CREATE_NO_PRE_PROCESS_HTML_URI) ||
392 (
flags & Uri_CREATE_IE_SETTINGS &&
flags & Uri_CREATE_NO_IE_SETTINGS));
399 if(!(*
flags & Uri_CREATE_NO_CANONICALIZE))
400 *
flags |= Uri_CREATE_CANONICALIZE;
401 if(!(*
flags & Uri_CREATE_NO_DECODE_EXTRA_INFO))
402 *
flags |= Uri_CREATE_DECODE_EXTRA_INFO;
403 if(!(*
flags & Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES))
404 *
flags |= Uri_CREATE_CRACK_UNKNOWN_SCHEMES;
405 if(!(*
flags & Uri_CREATE_NO_PRE_PROCESS_HTML_URI))
406 *
flags |= Uri_CREATE_PRE_PROCESS_HTML_URI;
407 if(!(*
flags & Uri_CREATE_IE_SETTINGS))
408 *
flags |= Uri_CREATE_NO_IE_SETTINGS;
465 if(
val >=
'0' &&
val <=
'9')
467 else if(
val >=
'a' &&
val <=
'f')
468 return val -
'a' + 10;
469 else if(
val >=
'A' &&
val <=
'F')
470 return val -
'A' + 10;
522 const WCHAR *last_tld, *sec_last_tld, *
end, *
p;
538 sec_last_tld = last_tld;
553 if(last_tld-
host == 0) {
554 if(
end-(last_tld-1) < 3)
556 }
else if(last_tld-
host == 3) {
570 }
else if(last_tld-
host < 3)
579 }
else if(
end+1-last_tld > 3) {
584 *domain_start = (sec_last_tld+1)-
host;
585 }
else if(last_tld - (sec_last_tld+1) < 4) {
593 if(last_tld - (sec_last_tld+1) == 3) {
596 for (
p = sec_last_tld;
p >
host;
p--)
if (
p[-1] ==
'.')
break;
597 *domain_start =
p -
host;
599 (
host+host_len)-(
host+*domain_start)));
604 *domain_start = (sec_last_tld+1)-
host;
610 for (
p = sec_last_tld;
p >
host;
p--)
if (
p[-1] ==
'.')
break;
611 *domain_start =
p -
host;
618 *domain_start = (sec_last_tld+1)-
host;
622 (
host+host_len)-(
host+*domain_start)));
718 DWORD i, max_len, cur_len;
719 INT max_index, cur_index;
721 max_len = cur_len = 0;
722 max_index = cur_index = -1;
723 for(
i = 0;
i < 8; ++
i) {
725 BOOL is_end = (check_ipv4 ||
i == 7);
747 if(cur_len > 1 && cur_len > max_len) {
750 max_index = cur_index;
835 static const WCHAR formatW[] =
836 {
'%',
'u',
'.',
'%',
'u',
'.',
'%',
'u',
'.',
'%',
'u',0};
855 static const WCHAR formatW[] = {
'%',
'u',0};
876 for(
i = 0;
i < component.
len; ++
i) {
889 DWORD i, cur_component = 0;
894 if(
address->components[
i].str >
address->elision && !already_passed_elision) {
900 number[cur_component++] = 0;
902 already_passed_elision =
TRUE;
910 if(!already_passed_elision &&
address->elision) {
913 number[cur_component++] = 0;
919 if(cur_component != 6) {
920 ERR(
"(%p %p): Failed sanity check with %d\n",
address,
number, cur_component);
965 const WCHAR *c1, *c2, *c3;
969 if(*c1 <
'0' || *c1 >
'9')
979 if(*c2 <
'0' || *c2 >
'9')
986 if(*c3 <
'0' || *c3 >
'9')
990 if(*c1 >=
'2' && *c2 >=
'5' && *c3 >=
'5') {
1096 data->scheme_len = 0;
1106 **
ptr !=
'-' && **
ptr !=
'.')
1133 if(
data->scheme &&
data->scheme_len) {
1149 }
else if(
data->is_relative) {
1170 static const WCHAR fileW[] = {
'f',
'i',
'l',
'e',0};
1175 if(
flags & Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME) {
1185 TRACE(
"(%p %p %x): URI is implicitly a file path, but, the ALLOW_IMPLICIT_FILE_SCHEME flag wasn't set.\n",
1195 if(
flags & Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME) {
1201 }
else if (
flags & Uri_CREATE_ALLOW_RELATIVE) {
1205 TRACE(
"(%p %p %x): Malformed URI found. Unable to deduce scheme name.\n",
ptr,
data,
flags);
1210 if(!
data->is_relative)
1224 while(**
ptr !=
':' && **
ptr !=
'@') {
1252 while(**
ptr !=
'@') {
1309 data->username_len = 0;
1318 data->username_len = 0;
1320 data->password_len = 0;
1396 TRACE(
"(%p %p %x): URI didn't contain anything looking like an IPv4 address.\n",
1406 data->host_type = Uri_HOST_IPV4;
1426 TRACE(
"(%p %p %x): IPv4 address found. host=%s host_len=%d host_type=%d\n",
1453 const BOOL has_start_bracket = **
ptr ==
'[';
1456 BOOL inside_brackets = has_start_bracket;
1470 data->host_type = Uri_HOST_UNKNOWN;
1485 (is_res && **
ptr && **
ptr !=
'/')) {
1486 if(**
ptr ==
':' && !ignore_col) {
1488 if(!inside_brackets) {
1489 const WCHAR *tmp = (*ptr)++;
1509 }
else if(**
ptr ==
'%' && (known_scheme && !is_res)) {
1521 }
else if(**
ptr ==
']')
1522 inside_brackets =
FALSE;
1523 else if(**
ptr ==
'[')
1524 inside_brackets =
TRUE;
1529 if(has_start_bracket) {
1531 if(*(*
ptr-1) ==
']') {
1532 TRACE(
"(%p %p %x %x): Expected an IP literal inside of the host\n",
1545 if(
data->host_len == 0 || is_res)
1546 data->host_type = Uri_HOST_UNKNOWN;
1548 data->host_type = Uri_HOST_DNS;
1550 TRACE(
"(%p %p %x %x): Parsed reg-name. host=%s len=%d\n",
ptr,
data,
flags, extras,
1587 BOOL is_split = (**
ptr ==
':');
1588 BOOL is_elision = (is_split && !is_end && *(*
ptr+1) ==
':');
1593 if(is_split || is_end) {
1596 cur_len = *
ptr - cur_start;
1602 TRACE(
"(%p %p %x): h16 component to long.\n",
1612 if(!((*
ptr ==
start && is_elision) ||
1613 (is_end && (*
ptr-2) ==
ip.elision))) {
1615 TRACE(
"(%p %p %x): IPv6 component cannot have a length of 0.\n",
1623 if(
ip.h16_count >= 8) {
1625 TRACE(
"(%p %p %x): Not a IPv6 address, too many h16 components.\n",
1630 ip.components[
ip.h16_count].str = cur_start;
1631 ip.components[
ip.h16_count].len = cur_len;
1633 TRACE(
"(%p %p %x): Found h16 component %s, len=%d, h16_count=%d\n",
1648 TRACE(
"(%p %p %x): IPv6 address cannot have 2 elisions.\n",
1668 ip.ipv4 = cur_start;
1669 ip.ipv4_len = *
ptr - cur_start;
1671 TRACE(
"(%p %p %x): Found an attached IPv4 address %s len=%d.\n",
1684 if(
ip.components_size +
ip.elision_size != 16) {
1686 TRACE(
"(%p %p %x): Invalid IPv6 address, did not add up to 16 bytes.\n",
1691 if(
ip.elision_size == 2) {
1700 if(
ip.elision <
ip.components[0].str ||
1701 ip.elision >
ip.components[
ip.h16_count-1].str) {
1703 TRACE(
"(%p %p %x): Invalid IPv6 address. Detected elision of 2 bytes at the beginning or end of the address.\n",
1709 data->host_type = Uri_HOST_IPV6;
1713 TRACE(
"(%p %p %x): Found valid IPv6 literal %s len=%d\n",
1724 if(**
ptr !=
'v' && **
ptr !=
'V')
1754 data->host_type = Uri_HOST_UNKNOWN;
1769 }
else if(**
ptr ==
'[')
1817 TRACE(
"(%p %p %x %x): Malformed URI, Unknown host type.\n",
1846 static const WCHAR slash[] = {
'/',0};
1853 }
else if(!(
flags & Uri_CREATE_NO_CANONICALIZE)) {
1867 (
flags & Uri_CREATE_FILE_USE_DOS_PATH)) {
1873 }
else if(**
ptr ==
'\\') {
1877 if(
flags & Uri_CREATE_NO_CANONICALIZE) {
1926 if (is_mailto && (*
ptr)[0] ==
'/' && (*
ptr)[1] ==
'/')
1935 if(**
ptr ==
'%' && known_scheme) {
1943 (
flags & Uri_CREATE_FILE_USE_DOS_PATH)) {
2001 !(
flags & Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES)) {
2006 if(**
ptr ==
'/' && *(*
ptr+1) ==
'/') {
2055 while(**
ptr && **
ptr !=
'#') {
2056 if(**
ptr ==
'%' && known_scheme &&
2057 !(
flags & Uri_CREATE_NO_DECODE_EXTRA_INFO)) {
2095 if(**
ptr ==
'%' && known_scheme &&
2096 !(
flags & Uri_CREATE_NO_DECODE_EXTRA_INFO)) {
2148 if(!
data->username) {
2149 uri->userinfo_start = -1;
2153 uri->userinfo_start =
uri->canon_len;
2175 if(!(
flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS)) {
2179 uri->canon_len += 3;
2196 if(!
data->password) {
2197 uri->userinfo_split = -1;
2201 if(
uri->userinfo_start == -1)
2203 uri->userinfo_start =
uri->canon_len;
2205 uri->userinfo_split =
uri->canon_len -
uri->userinfo_start;
2209 uri->canon_uri[
uri->canon_len] =
':';
2233 if(!(
flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS)) {
2237 uri->canon_len += 3;
2260 uri->userinfo_start =
uri->userinfo_split = -1;
2261 uri->userinfo_len = 0;
2263 if(!
data->username && !
data->password)
2273 uri->userinfo_len =
uri->canon_len -
uri->userinfo_start;
2275 TRACE(
"(%p %p %x %d): Canonicalized userinfo, userinfo_start=%d, userinfo=%s, userinfo_split=%d userinfo_len=%d.\n",
2277 uri->userinfo_split,
uri->userinfo_len);
2281 uri->canon_uri[
uri->canon_len] =
'@';
2309 {
'l',
'o',
'c',
'a',
'l',
'h',
'o',
's',
't',0};
2316 uri->host_start = -1;
2318 uri->host_type = Uri_HOST_UNKNOWN;
2325 uri->canon_uri[
uri->canon_len] =
'\\';
2326 uri->canon_uri[
uri->canon_len+1] =
'\\';
2328 uri->canon_len += 2;
2329 uri->authority_start =
uri->canon_len;
2332 uri->host_start =
uri->canon_len;
2335 if(*
ptr ==
'%' && known_scheme) {
2359 }
else if(*
ptr ==
'\\') {
2364 }
else if(!(
flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS) &&
is_ascii(*
ptr) &&
2370 if(!(
flags & Uri_CREATE_NO_CANONICALIZE)) {
2376 uri->canon_len += 3;
2379 if(!(
flags & Uri_CREATE_NO_CANONICALIZE) && known_scheme)
2389 uri->host_len =
uri->canon_len -
uri->host_start;
2398 &(
uri->domain_offset));
2405 uri->host_start =
uri->canon_len;
2415 uri->canon_len +=
data->host_len;
2423 uri->host_len =
uri->canon_len -
uri->host_start;
2424 uri->host_type = Uri_HOST_IPV4;
2427 TRACE(
"%p %p %x %d): Canonicalized implicit IP address=%s len=%d\n",
2454 if(
data->has_implicit_ip)
2457 uri->host_start =
uri->canon_len;
2462 DWORD i, octetDigitCount = 0, octetCount = 0;
2465 for(
i = 0;
i <
data->host_len; ++
i) {
2466 if(
data->host[
i] ==
'0' && !octetHasDigit) {
2472 if(octetDigitCount == 2 ||
2473 i+1 ==
data->host_len ||
2474 data->host[
i+1] ==
'.') {
2478 TRACE(
"Adding zero\n");
2480 }
else if(
data->host[
i] ==
'.') {
2485 octetDigitCount = 0;
2486 octetHasDigit =
FALSE;
2494 octetHasDigit =
TRUE;
2501 for( ; octetCount < 3; ++octetCount) {
2503 uri->canon_uri[
uri->canon_len] =
'.';
2504 uri->canon_uri[
uri->canon_len+1] =
'0';
2507 uri->canon_len += 2;
2513 uri->canon_len +=
data->host_len;
2516 uri->host_len =
uri->canon_len -
uri->host_start;
2518 TRACE(
"(%p %p %x %d): Canonicalized IPv4 address, ip=%s len=%d\n",
2564 uri->host_start =
uri->canon_len;
2569 uri->canon_len +=
data->host_len;
2576 TRACE(
"(%p %p %x %d): Failed to compute numerical value for IPv6 address.\n",
2582 uri->canon_uri[
uri->canon_len] =
'[';
2589 computeOnly, elision_start, elision_len);
2591 for(
i = 0;
i < 8; ++
i) {
2592 BOOL in_elision = (elision_start > -1 &&
i >= elision_start &&
2593 i < elision_start+elision_len);
2594 BOOL do_ipv4 = (
i == 6 &&
data->ipv6_address.ipv4 && !in_elision &&
2595 data->ipv6_address.h16_count == 0);
2597 if(
i == elision_start) {
2599 uri->canon_uri[
uri->canon_len] =
':';
2600 uri->canon_uri[
uri->canon_len+1] =
':';
2602 uri->canon_len += 2;
2613 if(
i != 0 && !(elision_start > -1 &&
i == elision_start+elision_len)) {
2615 uri->canon_uri[
uri->canon_len] =
':';
2641 uri->canon_uri[
uri->canon_len] =
'0';
2644 static const WCHAR formatW[] = {
'%',
'x',0};
2659 uri->canon_uri[
uri->canon_len] =
']';
2663 uri->host_len =
uri->canon_len -
uri->host_start;
2666 TRACE(
"(%p %p %x %d): Canonicalized IPv6 address %s, len=%d\n",
data,
uri,
flags,
2675 uri->host_start = -1;
2677 uri->domain_offset = -1;
2680 switch(
data->host_type) {
2682 uri->host_type = Uri_HOST_DNS;
2688 uri->host_type = Uri_HOST_IPV4;
2697 uri->host_type = Uri_HOST_IPV6;
2699 case Uri_HOST_UNKNOWN:
2701 uri->host_start =
uri->canon_len;
2706 uri->canon_len +=
data->host_len;
2707 uri->host_len =
data->host_len;
2710 uri->host_type = Uri_HOST_UNKNOWN;
2713 FIXME(
"(%p %p %x %d): Canonicalization for host type %d not supported.\n",
data,
2727 uri->port_offset = -1;
2732 has_default_port =
TRUE;
2738 uri->has_port =
data->has_port || has_default_port;
2746 if(has_default_port &&
data->has_port &&
data->port_value == default_port) {
2748 if(
flags & Uri_CREATE_NO_CANONICALIZE) {
2749 uri->port_offset =
uri->canon_len-
uri->authority_start;
2751 uri->canon_uri[
uri->canon_len] =
':';
2758 uri->canon_len +=
data->port_len;
2767 uri->port = default_port;
2768 }
else if(
data->has_port) {
2769 uri->port_offset =
uri->canon_len-
uri->authority_start;
2771 uri->canon_uri[
uri->canon_len] =
':';
2774 if(
flags & Uri_CREATE_NO_CANONICALIZE &&
data->port) {
2778 uri->canon_len +=
data->port_len;
2787 }
else if(has_default_port)
2788 uri->port = default_port;
2795 uri->authority_start =
uri->canon_len;
2796 uri->authority_len = 0;
2807 if(
uri->host_start != -1 || (
data->is_relative && (
data->password ||
data->username)))
2808 uri->authority_len =
uri->canon_len -
uri->authority_start;
2810 uri->authority_start = -1;
2845 BOOL is_implicit_scheme,
WCHAR *ret_path) {
2858 if(is_file && !has_host) {
2862 ret_path[
len] =
'/';
2865 }
else if(*
ptr ==
'/') {
2866 if(!(
flags & Uri_CREATE_FILE_USE_DOS_PATH)) {
2869 ret_path[
len] =
'/';
2879 ret_path[
len+1] =
':';
2886 if(!is_file && *
path && *
path !=
'/') {
2889 ret_path[
len] =
'/';
2896 if(*
ptr ==
'%' && !is_res) {
2904 if(force_encode || escape_pct) {
2909 do_default_action =
FALSE;
2920 }
else if(*
ptr ==
'/' && is_file && (
flags & Uri_CREATE_FILE_USE_DOS_PATH)) {
2923 ret_path[
len] =
'\\';
2925 do_default_action =
FALSE;
2926 }
else if(*
ptr ==
'\\' && known_scheme) {
2927 if(!(is_file && (
flags & Uri_CREATE_FILE_USE_DOS_PATH))) {
2930 ret_path[
len] =
'/';
2932 do_default_action =
FALSE;
2935 (!(
flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS) || is_file)) {
2936 if(!is_file || !(
flags & Uri_CREATE_FILE_USE_DOS_PATH)) {
2941 do_default_action =
FALSE;
2945 if(do_default_action) {
2956 if(!(is_file && (
flags & Uri_CREATE_FILE_USE_DOS_PATH)) &&
2958 if(!(
flags & Uri_CREATE_NO_CANONICALIZE) && ret_path) {
2996 uri->path_start = -1;
3001 uri->path_start =
uri->canon_len;
3006 flags |= Uri_CREATE_FILE_USE_DOS_PATH;
3013 uri->path_len =
data->path_len;
3014 uri->canon_len +=
data->path_len;
3021 if(
data->scheme && *(
data->path) ==
'/' && *(
data->path+1) ==
'/') {
3024 uri->canon_uri[
uri->canon_len] =
'/';
3025 uri->canon_uri[
uri->canon_len+1] =
'.';
3028 uri->canon_len += 2;
3034 if(*
ptr ==
'%' && known_scheme) {
3045 }
else if(*
ptr ==
'/' && is_file && (
flags & Uri_CREATE_FILE_USE_DOS_PATH)) {
3047 uri->canon_uri[
uri->canon_len] =
'\\';
3049 do_default_action =
FALSE;
3050 }
else if(*
ptr ==
'\\') {
3051 if((
data->is_relative || is_mk || is_file) && !(
flags & Uri_CREATE_FILE_USE_DOS_PATH)) {
3054 uri->canon_uri[
uri->canon_len] =
'/';
3056 do_default_action =
FALSE;
3058 }
else if(is_mk && *
ptr ==
':' &&
ptr + 1 <
data->path +
data->path_len && *(
ptr + 1) ==
':') {
3059 flags &= ~Uri_CREATE_FILE_USE_DOS_PATH;
3061 !(
flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS)) {
3062 if(!(is_file && (
flags & Uri_CREATE_FILE_USE_DOS_PATH))) {
3065 uri->canon_len += 3;
3066 do_default_action =
FALSE;
3070 if(do_default_action) {
3077 if(is_mk && !computeOnly && !(
flags & Uri_CREATE_NO_CANONICALIZE)) {
3079 uri->canon_len -
uri->path_start);
3080 uri->canon_len =
uri->path_start + new_len;
3083 uri->path_len =
uri->canon_len -
uri->path_start;
3086 TRACE(
"(%p %p %x %d): Canonicalized opaque URI path %s len=%d\n",
data,
uri,
flags, computeOnly,
3098 if(!
data->is_opaque || (
data->is_relative && (
data->password ||
data->username))) {
3105 if((
data->is_relative && (
data->host ||
data->has_port)) ||
3113 uri->canon_uri[
pos] =
'/';
3114 uri->canon_uri[
pos+1] =
'/';
3116 uri->canon_len += 2;
3122 if(
data->is_relative && (
data->password ||
data->username)) {
3127 uri->path_start =
uri->canon_len;
3130 uri->canon_len +=
uri->path_len;
3131 if(!computeOnly && !
uri->path_len)
3132 uri->path_start = -1;
3136 uri->userinfo_start =
uri->userinfo_split = -1;
3137 uri->userinfo_len = 0;
3138 uri->host_start = -1;
3140 uri->host_type = Uri_HOST_UNKNOWN;
3142 uri->authority_start = -1;
3143 uri->authority_len = 0;
3144 uri->domain_offset = -1;
3145 uri->port_offset = -1;
3169 if(
uri->path_start > -1 && !computeOnly)
3173 uri->extension_offset = -1;
3193 uri->query_start = -1;
3198 uri->query_start =
uri->canon_len;
3203 if(known_scheme && !(
flags & Uri_CREATE_NO_DECODE_EXTRA_INFO)) {
3215 if(!(
flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS) &&
3216 !(
flags & Uri_CREATE_NO_DECODE_EXTRA_INFO)) {
3219 uri->canon_len += 3;
3229 uri->query_len =
uri->canon_len -
uri->query_start;
3232 TRACE(
"(%p %p %x %d): Canonicalized query string %s len=%d\n",
data,
uri,
flags,
3242 if(!
data->fragment) {
3243 uri->fragment_start = -1;
3244 uri->fragment_len = 0;
3248 uri->fragment_start =
uri->canon_len;
3253 if(known_scheme && !(
flags & Uri_CREATE_NO_DECODE_EXTRA_INFO)) {
3265 if(!(
flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS) &&
3266 !(
flags & Uri_CREATE_NO_DECODE_EXTRA_INFO)) {
3269 uri->canon_len += 3;
3279 uri->fragment_len =
uri->canon_len -
uri->fragment_start;
3290 uri->scheme_start = -1;
3291 uri->scheme_len = 0;
3297 if(!
data->is_relative) {
3298 FIXME(
"(%p %p %x): Unable to determine the scheme type of %s.\n",
data,
3307 for(
i = 0;
i <
data->scheme_len; ++
i) {
3312 uri->canon_uri[
i +
pos] =
':';
3320 uri->canon_len +=
data->scheme_len + 1;
3321 uri->scheme_len =
data->scheme_len;
3337 TRACE(
"(%p %x): Beginning to compute canonicalized length for URI %s\n",
data,
flags,
3341 ERR(
"(%p %x): Failed to compute URI scheme length.\n",
data,
flags);
3346 ERR(
"(%p %x): Failed to compute URI hierpart length.\n",
data,
flags);
3351 ERR(
"(%p %x): Failed to compute query string length.\n",
data,
flags);
3356 ERR(
"(%p %x): Failed to compute fragment length.\n",
data,
flags);
3360 TRACE(
"(%p %x): Finished computing canonicalized URI length. length=%d\n",
data,
flags,
uri.canon_len);
3362 return uri.canon_len;
3377 uri->canon_size =
uri->canon_len = 0;
3384 ERR(
"(%p %p %x): Could not compute the canonicalized length of %s.\n",
data,
uri,
flags,
3395 ERR(
"(%p %p %x): Unable to canonicalize the scheme of the URI.\n",
data,
uri,
flags);
3398 uri->scheme_type =
data->scheme_type;
3401 ERR(
"(%p %p %x): Unable to canonicalize the heirpart of the URI\n",
data,
uri,
flags);
3406 ERR(
"(%p %p %x): Unable to canonicalize query string of the URI.\n",
3412 ERR(
"(%p %p %x): Unable to canonicalize fragment of the URI.\n",
3420 if(
uri->canon_len <
uri->canon_size) {
3428 uri->canon_uri = tmp;
3429 uri->canon_size =
uri->canon_len;
3432 uri->canon_uri[
uri->canon_len] =
'\0';
3453 if(!(*component) &&
source) {
3462 (*component)[source_len] =
'\0';
3463 *component_len = source_len;
3466 *output = *component;
3467 *output_len = *component_len;
3490 if(prefix && *new_value != prefix) {
3500 (*component)[
pos++] = prefix;
3503 *component_len =
len+
pos;
3506 *
flags |= success_flag;
3549 const WCHAR *component;
3569 data->scheme_len == expected_len) {
3571 TRACE(
"(%p %p %x): Found valid scheme component %s len=%d.\n", builder,
data,
flags,
3574 TRACE(
"(%p %p %x): Invalid scheme component found %s.\n", builder,
data,
flags,
3576 return INET_E_INVALID_URL;
3606 data->username_len == expected_len)
3607 TRACE(
"(%p %p %x): Found valid username component %s len=%d.\n", builder,
data,
flags,
3610 TRACE(
"(%p %p %x): Invalid username component found %s.\n", builder,
data,
flags,
3612 return INET_E_INVALID_URL;
3641 data->password_len == expected_len)
3642 TRACE(
"(%p %p %x): Found valid password component %s len=%d.\n", builder,
data,
flags,
3645 TRACE(
"(%p %p %x): Invalid password component found %s.\n", builder,
data,
flags,
3647 return INET_E_INVALID_URL;
3688 TRACE(
"(%p %p %x): Found valid host name %s len=%d type=%d.\n", builder,
data,
flags,
3691 TRACE(
"(%p %p %x): Invalid host name found %s.\n", builder,
data,
flags,
3693 return INET_E_INVALID_URL;
3712 TRACE(
"(%p %p %x): Using %u as port for IUri.\n", builder,
data,
flags,
data->port_value);
3717 const WCHAR *component;
3746 if(!
valid || (check_len && expected_len !=
data->path_len)) {
3747 TRACE(
"(%p %p %x): Invalid path component %s.\n", builder,
data,
flags,
3749 return INET_E_INVALID_URL;
3752 TRACE(
"(%p %p %x): Valid path component %s len=%d.\n", builder,
data,
flags,
3763 if(builder->
query) {
3777 TRACE(
"(%p %p %x): Valid query component %s len=%d.\n", builder,
data,
flags,
3780 TRACE(
"(%p %p %x): Invalid query component %s.\n", builder,
data,
flags,
3782 return INET_E_INVALID_URL;
3808 TRACE(
"(%p %p %x): Valid fragment component %s len=%d.\n", builder,
data,
flags,
3811 TRACE(
"(%p %p %x): Invalid fragment component %s.\n", builder,
data,
flags,
3813 return INET_E_INVALID_URL;
3825 TRACE(
"(%p %p %x): Beginning to validate builder components.\n", builder,
data,
flags);
3835 TRACE(
"(%p %p %x): File schemes can't contain a username or password.\n",
3837 return INET_E_INVALID_URL;
3852 if(!
data->is_relative)
3870 TRACE(
"(%p %p %x): Finished validating builder components.\n", builder,
data,
flags);
3877 WCHAR *canon_path_a, *canon_path_b;
3881 *
ret = !
b->path_len;
3891 if(
a->path_len ==
b->path_len && !
_wcsnicmp(
a->canon_uri+
a->path_start,
b->canon_uri+
b->path_start,
a->path_len)) {
3911 *
ret = len_a == len_b && !
_wcsnicmp(canon_path_a, canon_path_b, len_a);
3925 const BOOL are_hierarchical =
a->authority_start > -1 &&
b->authority_start > -1;
3930 if(
a->scheme_type !=
b->scheme_type)
3935 if((
a->scheme_start > -1 &&
b->scheme_start > -1) &&
3936 (
a->scheme_len ==
b->scheme_len)) {
3938 if(
StrCmpNW(
a->canon_uri+
a->scheme_start,
b->canon_uri+
b->scheme_start,
a->scheme_len))
3940 }
else if(
a->scheme_len !=
b->scheme_len)
3946 if((
a->userinfo_start > -1 &&
b->userinfo_start > -1) &&
3947 (
a->userinfo_len ==
b->userinfo_len)) {
3948 if(
StrCmpNW(
a->canon_uri+
a->userinfo_start,
b->canon_uri+
b->userinfo_start,
a->userinfo_len))
3950 }
else if(
a->userinfo_len !=
b->userinfo_len)
3955 if((
a->host_start > -1 &&
b->host_start > -1) &&
3956 (
a->host_len ==
b->host_len)) {
3959 if(
StrCmpNIW(
a->canon_uri+
a->host_start,
b->canon_uri+
b->host_start,
a->host_len))
3961 }
else if(
StrCmpNW(
a->canon_uri+
a->host_start,
b->canon_uri+
b->host_start,
a->host_len))
3963 }
else if(
a->host_len !=
b->host_len)
3967 if(
a->has_port &&
b->has_port) {
3968 if(
a->port !=
b->port)
3970 }
else if(
a->has_port ||
b->has_port)
3986 }
else if((
a->path_start > -1 &&
b->path_start > -1) &&
3987 (
a->path_len ==
b->path_len)) {
3988 if(
StrCmpNW(
a->canon_uri+
a->path_start,
b->canon_uri+
b->path_start,
a->path_len))
3990 }
else if(are_hierarchical &&
a->path_len == -1 &&
b->path_len == 0) {
3991 if(*(
a->canon_uri+
a->path_start) !=
'/')
3993 }
else if(are_hierarchical &&
b->path_len == 1 &&
a->path_len == 0) {
3994 if(*(
b->canon_uri+
b->path_start) !=
'/')
3996 }
else if(
a->path_len !=
b->path_len)
4000 if((
a->query_start > -1 &&
b->query_start > -1) &&
4001 (
a->query_len ==
b->query_len)) {
4002 if(
StrCmpNW(
a->canon_uri+
a->query_start,
b->canon_uri+
b->query_start,
a->query_len))
4004 }
else if(
a->query_len !=
b->query_len)
4007 if((
a->fragment_start > -1 &&
b->fragment_start > -1) &&
4008 (
a->fragment_len ==
b->fragment_len)) {
4009 if(
StrCmpNW(
a->canon_uri+
a->fragment_start,
b->canon_uri+
b->fragment_start,
a->fragment_len))
4011 }
else if(
a->fragment_len !=
b->fragment_len)
4053 if(!
data->is_opaque) {
4074 if(
data->username) {
4080 if(
data->password) {
4088 if(
data->password ||
data->username) {
4098 const BOOL add_brackets =
data->host_type == Uri_HOST_IPV6 && *(
data->host) !=
'[';
4116 if(
data->has_port) {
4142 if(!
data->is_opaque &&
data->path && *(
data->path) !=
'/') {
4172 if(
data->fragment) {
4198 return INET_E_INVALID_URL;
4229 TRACE(
"(%p)->(IID_IUriBuilderFactory %p)\n",
This,
ppv);
4230 *
ppv = &
This->IUriBuilderFactory_iface;
4233 *
ppv = &
This->IPersistStream_iface;
4280 if(!
This->create_flags)
4285 if(uriProp > Uri_PROPERTY_STRING_LAST) {
4287 if(uriProp == Uri_PROPERTY_ZONE) {
4289 if(!(*pbstrProperty))
4294 *pbstrProperty =
NULL;
4305 case Uri_PROPERTY_ABSOLUTE_URI:
4311 if(
This->userinfo_len == 0) {
4315 if(*pbstrProperty) {
4323 }
else if(
This->userinfo_split == 0 &&
This->userinfo_len == 1) {
4327 if(*pbstrProperty) {
4342 if(!(*pbstrProperty))
4346 case Uri_PROPERTY_AUTHORITY:
4347 if(
This->authority_start > -1) {
4360 if(!(*pbstrProperty))
4364 case Uri_PROPERTY_DISPLAY_URI:
4371 if(*pbstrProperty) {
4376 This->canon_uri+
This->userinfo_start+
This->userinfo_len+1,
4382 if(!(*pbstrProperty))
4388 case Uri_PROPERTY_DOMAIN:
4389 if(
This->domain_offset > -1) {
4391 This->host_len-
This->domain_offset);
4398 if(!(*pbstrProperty))
4402 case Uri_PROPERTY_EXTENSION:
4403 if(
This->extension_offset > -1) {
4405 This->path_len-
This->extension_offset);
4412 if(!(*pbstrProperty))
4416 case Uri_PROPERTY_FRAGMENT:
4417 if(
This->fragment_start > -1) {
4425 if(!(*pbstrProperty))
4429 case Uri_PROPERTY_HOST:
4430 if(
This->host_start > -1) {
4432 if(
This->host_type == Uri_HOST_IPV6)
4443 if(!(*pbstrProperty))
4447 case Uri_PROPERTY_PASSWORD:
4448 if(
This->userinfo_split > -1) {
4450 This->canon_uri+
This->userinfo_start+
This->userinfo_split+1,
4451 This->userinfo_len-
This->userinfo_split-1);
4458 if(!(*pbstrProperty))
4462 case Uri_PROPERTY_PATH:
4463 if(
This->path_start > -1) {
4471 if(!(*pbstrProperty))
4475 case Uri_PROPERTY_PATH_AND_QUERY:
4476 if(
This->path_start > -1) {
4479 }
else if(
This->query_start > -1) {
4487 if(!(*pbstrProperty))
4491 case Uri_PROPERTY_QUERY:
4492 if(
This->query_start > -1) {
4500 if(!(*pbstrProperty))
4504 case Uri_PROPERTY_RAW_URI:
4506 if(!(*pbstrProperty))
4511 case Uri_PROPERTY_SCHEME_NAME:
4512 if(
This->scheme_start > -1) {
4520 if(!(*pbstrProperty))
4524 case Uri_PROPERTY_USER_INFO:
4525 if(
This->userinfo_start > -1) {
4533 if(!(*pbstrProperty))
4537 case Uri_PROPERTY_USER_NAME:
4538 if(
This->userinfo_start > -1 &&
This->userinfo_split != 0) {
4542 if(
This->userinfo_split > -1) {
4554 if(!(*pbstrProperty))
4572 if(!
This->create_flags)
4578 if(uriProp > Uri_PROPERTY_STRING_LAST)
4588 case Uri_PROPERTY_ABSOLUTE_URI:
4594 if(
This->userinfo_start > -1 &&
This->userinfo_len == 0)
4596 *pcchProperty =
This->canon_len-1;
4597 else if(
This->userinfo_start > -1 &&
This->userinfo_len == 1 &&
4598 This->userinfo_split == 0)
4600 *pcchProperty =
This->canon_len-2;
4602 *pcchProperty =
This->canon_len;
4604 *pcchProperty =
This->canon_len;
4610 case Uri_PROPERTY_AUTHORITY:
4611 if(
This->port_offset > -1 &&
4615 *pcchProperty =
This->port_offset;
4617 *pcchProperty =
This->authority_len;
4620 case Uri_PROPERTY_DISPLAY_URI:
4622 *pcchProperty =
This->canon_len-
This->userinfo_len-1;
4624 *pcchProperty =
This->canon_len;
4628 case Uri_PROPERTY_DOMAIN:
4629 if(
This->domain_offset > -1)
4630 *pcchProperty =
This->host_len -
This->domain_offset;
4636 case Uri_PROPERTY_EXTENSION:
4637 if(
This->extension_offset > -1) {
4638 *pcchProperty =
This->path_len -
This->extension_offset;
4646 case Uri_PROPERTY_FRAGMENT:
4647 *pcchProperty =
This->fragment_len;
4650 case Uri_PROPERTY_HOST:
4651 *pcchProperty =
This->host_len;
4654 if(
This->host_type == Uri_HOST_IPV6)
4659 case Uri_PROPERTY_PASSWORD:
4660 *pcchProperty = (
This->userinfo_split > -1) ?
This->userinfo_len-
This->userinfo_split-1 : 0;
4663 case Uri_PROPERTY_PATH:
4664 *pcchProperty =
This->path_len;
4667 case Uri_PROPERTY_PATH_AND_QUERY:
4668 *pcchProperty =
This->path_len+
This->query_len;
4671 case Uri_PROPERTY_QUERY:
4672 *pcchProperty =
This->query_len;
4675 case Uri_PROPERTY_RAW_URI:
4679 case Uri_PROPERTY_SCHEME_NAME:
4680 *pcchProperty =
This->scheme_len;
4683 case Uri_PROPERTY_USER_INFO:
4684 *pcchProperty =
This->userinfo_len;
4687 case Uri_PROPERTY_USER_NAME:
4688 *pcchProperty = (
This->userinfo_split > -1) ?
This->userinfo_split :
This->userinfo_len;
4689 if(
This->userinfo_split == 0)
4709 if(!
This->create_flags)
4719 if(uriProp == Uri_PROPERTY_ZONE) {
4720 *pcchProperty = URLZONE_INVALID;
4724 if(uriProp < Uri_PROPERTY_DWORD_START) {
4730 case Uri_PROPERTY_HOST_TYPE:
4731 *pcchProperty =
This->host_type;
4734 case Uri_PROPERTY_PORT:
4735 if(!
This->has_port) {
4739 *pcchProperty =
This->port;
4744 case Uri_PROPERTY_SCHEME:
4745 *pcchProperty =
This->scheme_type;
4766 case Uri_PROPERTY_ABSOLUTE_URI:
4769 case Uri_PROPERTY_AUTHORITY:
4770 *pfHasProperty =
This->authority_start > -1;
4772 case Uri_PROPERTY_DISPLAY_URI:
4773 *pfHasProperty =
TRUE;
4775 case Uri_PROPERTY_DOMAIN:
4776 *pfHasProperty =
This->domain_offset > -1;
4778 case Uri_PROPERTY_EXTENSION:
4779 *pfHasProperty =
This->extension_offset > -1;
4781 case Uri_PROPERTY_FRAGMENT:
4782 *pfHasProperty =
This->fragment_start > -1;
4784 case Uri_PROPERTY_HOST:
4785 *pfHasProperty =
This->host_start > -1;
4787 case Uri_PROPERTY_PASSWORD:
4788 *pfHasProperty =
This->userinfo_split > -1;
4790 case Uri_PROPERTY_PATH:
4791 *pfHasProperty =
This->path_start > -1;
4793 case Uri_PROPERTY_PATH_AND_QUERY:
4794 *pfHasProperty = (
This->path_start > -1 ||
This->query_start > -1);
4796 case Uri_PROPERTY_QUERY:
4797 *pfHasProperty =
This->query_start > -1;
4799 case Uri_PROPERTY_RAW_URI:
4800 *pfHasProperty =
TRUE;
4802 case Uri_PROPERTY_SCHEME_NAME:
4803 *pfHasProperty =
This->scheme_start > -1;
4805 case Uri_PROPERTY_USER_INFO:
4806 *pfHasProperty =
This->userinfo_start > -1;
4808 case Uri_PROPERTY_USER_NAME:
4809 if(
This->userinfo_split == 0)
4810 *pfHasProperty =
FALSE;
4812 *pfHasProperty =
This->userinfo_start > -1;
4814 case Uri_PROPERTY_HOST_TYPE:
4815 *pfHasProperty =
TRUE;
4817 case Uri_PROPERTY_PORT:
4818 *pfHasProperty =
This->has_port;
4820 case Uri_PROPERTY_SCHEME:
4821 *pfHasProperty =
TRUE;
4823 case Uri_PROPERTY_ZONE:
4824 *pfHasProperty =
FALSE;
4827 FIXME(
"(%p)->(%d %p): Unsupported property type.\n",
This, uriProp, pfHasProperty);
4836 TRACE(
"(%p)->(%p)\n", iface, pstrAbsoluteUri);
4837 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_ABSOLUTE_URI, pstrAbsoluteUri, 0);
4842 TRACE(
"(%p)->(%p)\n", iface, pstrAuthority);
4843 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_AUTHORITY, pstrAuthority, 0);
4848 TRACE(
"(%p)->(%p)\n", iface, pstrDisplayUri);
4849 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_DISPLAY_URI, pstrDisplayUri, 0);
4854 TRACE(
"(%p)->(%p)\n", iface, pstrDomain);
4855 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_DOMAIN, pstrDomain, 0);
4860 TRACE(
"(%p)->(%p)\n", iface, pstrExtension);
4861 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_EXTENSION, pstrExtension, 0);
4866 TRACE(
"(%p)->(%p)\n", iface, pstrFragment);
4867 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_FRAGMENT, pstrFragment, 0);
4872 TRACE(
"(%p)->(%p)\n", iface, pstrHost);
4873 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_HOST, pstrHost, 0);
4878 TRACE(
"(%p)->(%p)\n", iface, pstrPassword);
4879 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_PASSWORD, pstrPassword, 0);
4884 TRACE(
"(%p)->(%p)\n", iface, pstrPath);
4885 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_PATH, pstrPath, 0);
4890 TRACE(
"(%p)->(%p)\n", iface, pstrPathAndQuery);
4891 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_PATH_AND_QUERY, pstrPathAndQuery, 0);
4896 TRACE(
"(%p)->(%p)\n", iface, pstrQuery);
4897 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_QUERY, pstrQuery, 0);
4902 TRACE(
"(%p)->(%p)\n", iface, pstrRawUri);
4903 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_RAW_URI, pstrRawUri, 0);
4908 TRACE(
"(%p)->(%p)\n", iface, pstrSchemeName);
4909 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_SCHEME_NAME, pstrSchemeName, 0);
4914 TRACE(
"(%p)->(%p)\n", iface, pstrUserInfo);
4915 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_USER_INFO, pstrUserInfo, 0);
4920 TRACE(
"(%p)->(%p)\n", iface, pstrUserName);
4921 return IUri_GetPropertyBSTR(iface, Uri_PROPERTY_USER_NAME, pstrUserName, 0);
4926 TRACE(
"(%p)->(%p)\n", iface, pdwHostType);
4927 return IUri_GetPropertyDWORD(iface, Uri_PROPERTY_HOST_TYPE, pdwHostType, 0);
4932 TRACE(
"(%p)->(%p)\n", iface, pdwPort);
4933 return IUri_GetPropertyDWORD(iface, Uri_PROPERTY_PORT, pdwPort, 0);
4938 TRACE(
"(%p)->(%p)\n", iface, pdwScheme);
4939 return IUri_GetPropertyDWORD(iface, Uri_PROPERTY_SCHEME, pdwScheme, 0);
4944 TRACE(
"(%p)->(%p)\n", iface, pdwZone);
4945 return IUri_GetPropertyDWORD(iface, Uri_PROPERTY_ZONE,pdwZone, 0);
4953 if(!
This->create_flags)
4959 *pdwProperties = Uri_HAS_DISPLAY_URI|Uri_HAS_RAW_URI|Uri_HAS_SCHEME|Uri_HAS_HOST_TYPE;
4962 *pdwProperties |= Uri_HAS_ABSOLUTE_URI;
4964 if(
This->scheme_start > -1)
4965 *pdwProperties |= Uri_HAS_SCHEME_NAME;
4967 if(
This->authority_start > -1) {
4968 *pdwProperties |= Uri_HAS_AUTHORITY;
4969 if(
This->userinfo_start > -1) {
4970 *pdwProperties |= Uri_HAS_USER_INFO;
4971 if(
This->userinfo_split != 0)
4972 *pdwProperties |= Uri_HAS_USER_NAME;
4974 if(
This->userinfo_split > -1)
4975 *pdwProperties |= Uri_HAS_PASSWORD;
4976 if(
This->host_start > -1)
4977 *pdwProperties |= Uri_HAS_HOST;
4978 if(
This->domain_offset > -1)
4979 *pdwProperties |= Uri_HAS_DOMAIN;
4983 *pdwProperties |= Uri_HAS_PORT;
4984 if(
This->path_start > -1)
4985 *pdwProperties |= Uri_HAS_PATH|Uri_HAS_PATH_AND_QUERY;
4986 if(
This->query_start > -1)
4987 *pdwProperties |= Uri_HAS_QUERY|Uri_HAS_PATH_AND_QUERY;
4989 if(
This->extension_offset > -1)
4990 *pdwProperties |= Uri_HAS_EXTENSION;
4992 if(
This->fragment_start > -1)
4993 *pdwProperties |= Uri_HAS_FRAGMENT;
5005 if(!
This->create_flags)
5019 FIXME(
"(%p)->(%p %p) No support for unknown IUri's yet.\n", iface, pUri, pfEqual);
5066 return IUri_QueryInterface(&
This->IUri_iface,
riid,
ppv);
5072 return IUri_AddRef(&
This->IUri_iface);
5078 return IUri_Release(&
This->IUri_iface);
5093 *ppIUriBuilder =
NULL;
5112 *ppIUriBuilder =
NULL;
5141 return IUri_AddRef(&
This->IUri_iface);
5147 return IUri_Release(&
This->IUri_iface);
5158 *pClassID = CLSID_CUri;
5188 if(
This->create_flags)
5210 if(*(
DWORD*)
data->data != Uri_PROPERTY_RAW_URI) {
5212 ERR(
"Can't find raw_uri\n");
5217 if(!
This->raw_uri) {
5221 This->create_flags =
data->create_flags;
5229 This->create_flags = 0;
5236 This->create_flags = 0;
5260 data->create_flags =
This->create_flags;
5262 if(
This->create_flags) {
5263 data->fields_no = 1;
5271 if(
This->fragment_len) {
5274 This->fragment_len,
This->canon_uri+
This->fragment_start);
5277 if(
This->host_len) {
5279 if(
This->host_type == Uri_HOST_IPV6)
5287 if(
This->userinfo_split > -1) {
5290 This->userinfo_len-
This->userinfo_split-1,
5291 This->canon_uri+
This->userinfo_start+
This->userinfo_split+1);
5294 if(
This->path_len) {
5298 }
else if(marshal) {
5299 WCHAR no_path =
'/';
5304 if(
This->has_port) {
5306 *(
DWORD*)
p = Uri_PROPERTY_PORT;
5314 if(
This->query_len) {
5320 if(
This->scheme_len) {
5326 if(
This->userinfo_start>-1 &&
This->userinfo_split!=0) {
5328 if(
This->userinfo_split > -1)
5330 This->userinfo_split,
This->canon_uri+
This->userinfo_start);
5333 This->userinfo_len,
This->canon_uri+
This->userinfo_start);
5344 TRACE(
"(%p)->(%p %x)\n",
This, pStm, fClearDirty);
5349 hres = IPersistStream_GetSizeMax(&
This->IPersistStream_iface, &
size);
5353 data = heap_alloc_zero(
size.u.LowPart);
5373 pcbSize->
u.HighPart = 0;
5374 if(
This->create_flags)
5377 pcbSize->
u.LowPart -=
sizeof(
DWORD);
5382 if(
This->fragment_len)
5383 pcbSize->
u.LowPart += (
This->fragment_len+1)*
sizeof(
WCHAR) + 2*
sizeof(
DWORD);
5384 if(
This->host_len) {
5385 if(
This->host_type == Uri_HOST_IPV6)
5386 pcbSize->
u.LowPart += (
This->host_len-1)*
sizeof(
WCHAR) + 2*
sizeof(
DWORD);
5388 pcbSize->
u.LowPart += (
This->host_len+1)*
sizeof(
WCHAR) + 2*
sizeof(
DWORD);
5390 if(
This->userinfo_split > -1)
5391 pcbSize->
u.LowPart += (
This->userinfo_len-
This->userinfo_split)*
sizeof(
WCHAR) + 2*
sizeof(
DWORD);
5393 pcbSize->
u.LowPart += (
This->path_len+1)*
sizeof(
WCHAR) + 2*
sizeof(
DWORD);
5395 pcbSize->
u.LowPart += 3*
sizeof(
DWORD);
5397 pcbSize->
u.LowPart += (
This->query_len+1)*
sizeof(
WCHAR) + 2*
sizeof(
DWORD);
5398 if(
This->scheme_len)
5399 pcbSize->
u.LowPart += (
This->scheme_len+1)*
sizeof(
WCHAR) + 2*
sizeof(
DWORD);
5400 if(
This->userinfo_start>-1 &&
This->userinfo_split!=0) {
5401 if(
This->userinfo_split > -1)
5402 pcbSize->
u.LowPart += (
This->userinfo_split+1)*
sizeof(
WCHAR) + 2*
sizeof(
DWORD);
5404 pcbSize->
u.LowPart += (
This->userinfo_len+1)*
sizeof(
WCHAR) + 2*
sizeof(
DWORD);
5434 return IUri_AddRef(&
This->IUri_iface);
5440 return IUri_Release(&
This->IUri_iface);
5444 DWORD dwDestContext,
void *pvDestContext,
DWORD mshlflags,
CLSID *pCid)
5448 dwDestContext, pvDestContext, mshlflags, pCid);
5450 if(!pCid || (dwDestContext!=MSHCTX_LOCAL && dwDestContext!=MSHCTX_NOSHAREDMEM
5451 && dwDestContext!=MSHCTX_INPROC))
5466 DWORD dwDestContext,
void *pvDestContext,
DWORD mshlflags,
DWORD *pSize)
5472 dwDestContext, pvDestContext, mshlflags, pSize);
5474 if(!pSize || (dwDestContext!=MSHCTX_LOCAL && dwDestContext!=MSHCTX_NOSHAREDMEM
5475 && dwDestContext!=MSHCTX_INPROC))
5478 if(dwDestContext == MSHCTX_INPROC) {
5483 hres = IPersistStream_GetSizeMax(&
This->IPersistStream_iface, &
size);
5490 *pSize =
size.u.LowPart+2*
sizeof(
DWORD);
5503 dwDestContext, pvDestContext,
mshlflags);
5505 if(!pStm ||
mshlflags!=MSHLFLAGS_NORMAL || (dwDestContext!=MSHCTX_LOCAL
5506 && dwDestContext!=MSHCTX_NOSHAREDMEM && dwDestContext!=MSHCTX_INPROC))
5509 if(dwDestContext == MSHCTX_INPROC) {
5513 data.mshlflags = MSHCTX_INPROC;
5524 IUri_AddRef(&
This->IUri_iface);
5528 hres = IMarshal_GetMarshalSizeMax(iface,
riid, pv, dwDestContext,
5538 data[1] = dwDestContext;
5556 if(
This->create_flags)
5565 if(
header[1]!=MSHCTX_LOCAL &&
header[1]!=MSHCTX_NOSHAREDMEM
5566 &&
header[1]!=MSHCTX_INPROC)
5569 if(
header[1] == MSHCTX_INPROC) {
5578 if(!
This->raw_uri) {
5583 parse.uri =
This->raw_uri;
5592 This->create_flags =
data.uri->create_flags;
5593 IUri_Release(&
data.uri->IUri_iface);
5595 return IUri_QueryInterface(&
This->IUri_iface,
riid,
ppv);
5598 hres = IPersistStream_Load(&
This->IPersistStream_iface, pStm);
5602 return IUri_QueryInterface(&
This->IUri_iface,
riid,
ppv);
5621 if(
header[1] == MSHCTX_INPROC) {
5628 IUri_Release(&
data.uri->IUri_iface);
5634 return IStream_Seek(pStm, off, STREAM_SEEK_CUR,
NULL);
5658 Uri *
ret = heap_alloc_zero(
sizeof(
Uri));
5660 TRACE(
"(%p %p)\n", pUnkOuter, ppobj);
5672 *ppobj = &
ret->IUri_iface;
5702 const DWORD supported_flags = Uri_CREATE_ALLOW_RELATIVE|Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME|
5703 Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME|Uri_CREATE_NO_CANONICALIZE|Uri_CREATE_CANONICALIZE|
5704 Uri_CREATE_DECODE_EXTRA_INFO|Uri_CREATE_NO_DECODE_EXTRA_INFO|Uri_CREATE_CRACK_UNKNOWN_SCHEMES|
5705 Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES|Uri_CREATE_PRE_PROCESS_HTML_URI|Uri_CREATE_NO_PRE_PROCESS_HTML_URI|
5706 Uri_CREATE_NO_IE_SETTINGS|Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS|Uri_CREATE_FILE_USE_DOS_PATH;
5728 if(
dwFlags & ~supported_flags)
5729 FIXME(
"Ignoring unsupported flag(s) %x\n",
dwFlags & ~supported_flags);
5741 if(!(
dwFlags & Uri_CREATE_NO_PRE_PROCESS_HTML_URI))
5757 IUri_Release(&
ret->IUri_iface);
5765 IUri_Release(&
ret->IUri_iface);
5772 *ppURI = &
ret->IUri_iface;
5812 DWORD uri_len, frag_len;
5825 add_pound = *pwzFragment !=
'#';
5837 uriW[uri_len++] =
'#';
5838 memcpy(uriW+uri_len, pwzFragment, (frag_len+1)*
sizeof(
WCHAR));
5866 if((use_orig_flags & UriBuilder_USE_ORIGINAL_FLAGS) && builder->
uri)
5899 IUri_Release(&
ret->IUri_iface);
5919 *
ppv = &
This->IUriBuilder_iface;
5922 *
ppv = &
This->IUriBuilder_iface;
5951 if(
This->uri) IUri_Release(&
This->uri->IUri_iface);
5966 DWORD dwAllowEncodingPropertyMask,
5974 hr =
build_uri(
This, ppIUri, 0, UriBuilder_USE_ORIGINAL_FLAGS, dwAllowEncodingPropertyMask);
5981 DWORD dwCreateFlags,
5982 DWORD dwAllowEncodingPropertyMask,
5990 if(dwCreateFlags == -1)
5991 hr =
build_uri(
This, ppIUri, 0, UriBuilder_USE_ORIGINAL_FLAGS, dwAllowEncodingPropertyMask);
5993 hr =
build_uri(
This, ppIUri, dwCreateFlags, 0, dwAllowEncodingPropertyMask);
6001 DWORD dwCreateFlags,
6002 DWORD dwUriBuilderFlags,
6003 DWORD dwAllowEncodingPropertyMask,
6009 TRACE(
"(%p)->(0x%08x 0x%08x %d %d %p)\n",
This, dwCreateFlags, dwUriBuilderFlags,
6012 hr =
build_uri(
This, ppIUri, dwCreateFlags, dwUriBuilderFlags, dwAllowEncodingPropertyMask);
6014 FIXME(
"(%p)->(0x%08x 0x%08x %d %d %p)\n",
This, dwCreateFlags, dwUriBuilderFlags,
6059 FIXME(
"(%p)->(%p) Unknown IUri types not supported yet.\n",
This, pIUri);
6062 }
else if(
This->uri)
6072 TRACE(
"(%p)->(%p %p)\n",
This, pcchFragment, ppwzFragment);
6074 if(!
This->uri ||
This->uri->fragment_start == -1 ||
This->modified_props & Uri_HAS_FRAGMENT)
6078 This->uri->fragment_len, ppwzFragment, pcchFragment);
6084 TRACE(
"(%p)->(%p %p)\n",
This, pcchHost, ppwzHost);
6086 if(!
This->uri ||
This->uri->host_start == -1 ||
This->modified_props & Uri_HAS_HOST)
6089 if(
This->uri->host_type == Uri_HOST_IPV6)
6092 This->uri->host_len-2, ppwzHost, pcchHost);
6095 This->uri->host_len, ppwzHost, pcchHost);
6102 TRACE(
"(%p)->(%p %p)\n",
This, pcchPassword, ppwzPassword);
6104 if(!
This->uri ||
This->uri->userinfo_split == -1 ||
This->modified_props & Uri_HAS_PASSWORD)
6118 if(!
This->uri ||
This->uri->path_start == -1 ||
This->modified_props & Uri_HAS_PATH)
6128 TRACE(
"(%p)->(%p %p)\n",
This, pfHasPort, pdwPort);
6141 *pfHasPort =
This->has_port;
6142 *pdwPort =
This->port;
6149 TRACE(
"(%p)->(%p %p)\n",
This, pcchQuery, ppwzQuery);
6151 if(!
This->uri ||
This->uri->query_start == -1 ||
This->modified_props & Uri_HAS_QUERY)
6155 This->uri->query_len, ppwzQuery, pcchQuery);
6161 TRACE(
"(%p)->(%p %p)\n",
This, pcchSchemeName, ppwzSchemeName);
6163 if(!
This->uri ||
This->uri->scheme_start == -1 ||
This->modified_props & Uri_HAS_SCHEME_NAME)
6167 This->uri->scheme_len, ppwzSchemeName, pcchSchemeName);
6173 TRACE(
"(%p)->(%p %p)\n",
This, pcchUserName, ppwzUserName);
6175 if(!
This->uri ||
This->uri->userinfo_start == -1 ||
This->uri->userinfo_split == 0 ||
6176 This->modified_props & Uri_HAS_USER_NAME)
6182 if(
This->uri->userinfo_split > -1)
6185 This->uri->userinfo_split, ppwzUserName, pcchUserName);
6188 This->uri->userinfo_len, ppwzUserName, pcchUserName);
6197 &
This->modified_props, Uri_HAS_FRAGMENT);
6210 &
This->modified_props, Uri_HAS_HOST);
6218 &
This->modified_props, Uri_HAS_PASSWORD);
6226 &
This->modified_props, Uri_HAS_PATH);
6232 TRACE(
"(%p)->(%d %d)\n",
This, fHasPort, dwNewValue);
6234 This->has_port = fHasPort;
6235 This->port = dwNewValue;
6236 This->modified_props |= Uri_HAS_PORT;
6245 &
This->modified_props, Uri_HAS_QUERY);
6254 if(!pwzNewValue || !*pwzNewValue)
6258 &
This->modified_props, Uri_HAS_SCHEME_NAME);
6266 &
This->modified_props, Uri_HAS_USER_NAME);
6271 const DWORD accepted_flags = Uri_HAS_AUTHORITY|Uri_HAS_DOMAIN|Uri_HAS_EXTENSION|Uri_HAS_FRAGMENT|Uri_HAS_HOST|
6272 Uri_HAS_PASSWORD|Uri_HAS_PATH|Uri_HAS_PATH_AND_QUERY|Uri_HAS_QUERY|
6273 Uri_HAS_USER_INFO|Uri_HAS_USER_NAME;
6276 TRACE(
"(%p)->(0x%08x)\n",
This, dwPropertyMask);
6278 if(dwPropertyMask & ~accepted_flags)
6281 if(dwPropertyMask & Uri_HAS_FRAGMENT)
6287 if(dwPropertyMask & Uri_HAS_HOST)
6289 &
This->modified_props, Uri_HAS_HOST);
6291 if(dwPropertyMask & Uri_HAS_PASSWORD)
6294 if(dwPropertyMask & Uri_HAS_PATH)
6297 if(dwPropertyMask & Uri_HAS_PORT)
6300 if(dwPropertyMask & Uri_HAS_QUERY)
6303 if(dwPropertyMask & Uri_HAS_USER_NAME)
6312 TRACE(
"(%p)->(%p)\n",
This, pfModified);
6317 *pfModified =
This->modified_props > 0;
6373 if(!
uri->create_flags) {
6386 *ppIUriBuilder =
NULL;
6387 FIXME(
"(%p %x %x %p): Unknown IUri types not supported yet.\n", pIUri,
dwFlags,
6393 *ppIUriBuilder = &
ret->IUriBuilder_iface;
6404 DWORD base_copy_len = 0;
6411 if(
end[0] ==
':' &&
end[1] ==
':') {
6439 ptr += base_copy_len;
6442 ptr += relative_len;
6488 IUri_Release(&
ret->IUri_iface);
6499 DWORD raw_flags = 0;
6501 if(
base->scheme_start > -1) {
6503 data.scheme_len =
base->scheme_len;
6504 data.scheme_type =
base->scheme_type;
6512 proc_uri = relative;
6542 }
else if(!
data.is_opaque) {
6552 proc_uri = relative;
6578 if(
base->path_len > 3 && *(
base->canon_uri+
base->path_start) ==
'/' &&
6581 copy_drive_path =
TRUE;
6596 if(copy_drive_path) {
6626 DWORD offset = (path_offset > 0) ? path_offset+1 : 0;
6637 tmp[new_len+
offset] =
'\0';
6695 IUri_Release(&
ret->IUri_iface);
6722 TRACE(
"(%p %p %x %p %x)\n", pBaseUri, pRelativeUri, dwCombineFlags, ppCombinedUri, (
DWORD)
dwReserved);
6727 if(!pBaseUri || !pRelativeUri) {
6728 *ppCombinedUri =
NULL;
6734 if(!relative || !
base) {
6735 *ppCombinedUri =
NULL;
6736 FIXME(
"(%p %p %x %p %x) Unknown IUri types not supported yet.\n",
6737 pBaseUri, pRelativeUri, dwCombineFlags, ppCombinedUri, (
DWORD)
dwReserved);
6744 DWORD result_len = 0;
6746 hr = IInternetProtocolInfo_CombineUrl(
info,
base->canon_uri, relative->
canon_uri, dwCombineFlags,
6748 IInternetProtocolInfo_Release(
info);
6770 TRACE(
"(%p %s %x %p %x)\n", pBaseUri,
debugstr_w(pwzRelativeUrl), dwCombineFlags,
6776 if(!pwzRelativeUrl) {
6777 *ppCombinedUri =
NULL;
6782 *ppCombinedUri =
NULL;
6788 *ppCombinedUri =
NULL;
6789 FIXME(
"(%p %s %x %p %x) Unknown IUri's not supported yet.\n", pBaseUri,
debugstr_w(pwzRelativeUrl),
6797 DWORD result_len = 0;
6799 hr = IInternetProtocolInfo_CombineUrl(
info,
base->canon_uri, pwzRelativeUrl, dwCombineFlags,
6801 IInternetProtocolInfo_Release(
info);
6809 hr =
CreateUri(pwzRelativeUrl, Uri_CREATE_ALLOW_RELATIVE|Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, 0, &relative);
6811 *ppCombinedUri =
NULL;
6817 IUri_Release(relative);
6839 if(
uri->scheme_start > -1 &&
uri->path_start > -1) {
6840 ptr =
uri->canon_uri+
uri->scheme_start+
uri->scheme_len+1;
6846 for(
ptr =
uri->canon_uri; ptr < uri->canon_uri+
uri->canon_len; ++
ptr) {
6852 if(reduce_path && !
path &&
ptr ==
uri->canon_uri+
uri->path_start)
6856 if(reduce_path &&
ptr ==
uri->canon_uri+
uri->path_start+
uri->path_len) {
6861 len -= (current_path_len-new_path_len);
6862 reduce_path =
FALSE;
6869 if(
len < output_len)
6870 output[
len] = decoded;
6873 do_default_action =
FALSE;
6879 if(
len + 3 < output_len)
6882 do_default_action =
FALSE;
6884 }
else if(*
ptr ==
' ') {
6887 if(
len + 3 < output_len)
6890 do_default_action =
FALSE;
6894 if(
len + 3 < output_len)
6897 do_default_action =
FALSE;
6901 if(do_default_action) {
6902 if(
len < output_len)
6911 if(reduce_path &&
path) {
6916 len -= (current_path_len-new_path_len);
6919 if(
len < output_len)
6922 output[output_len-1] = 0;
6926 if(
len >= output_len)
6939 hr = IUri_GetPropertyLength(
uri, Uri_PROPERTY_DISPLAY_URI, &display_len, 0);
6945 *result_len = display_len;
6946 if(display_len+1 > output_len)
6963 static const WCHAR colon_slashesW[] = {
':',
'/',
'/'};
6971 if(
uri->authority_start == -1 ||
6982 len =
uri->scheme_len+
uri->authority_len;
6986 if(
len+1 > output_len) {
6996 memcpy(
ptr, colon_slashesW,
sizeof(colon_slashesW));
7003 ptr +=
uri->authority_len;
7021 uri->authority_start == -1) {
7030 if(
uri->fragment_start > -1)
7031 len =
uri->fragment_start;
7036 if(
len+1 > output_len)
7047 const WCHAR *path_ptr;
7059 if(
uri->host_start > -1) {
7060 static const WCHAR slash_slashW[] = {
'\\',
'\\'};
7062 memcpy(
ptr, slash_slashW,
sizeof(slash_slashW));
7068 path_ptr =
uri->canon_uri+
uri->path_start;
7073 for(; path_ptr <
uri->canon_uri+
uri->path_start+
uri->path_len; ++path_ptr, ++
ptr) {
7076 if(*path_ptr ==
'%') {
7081 do_default_action =
FALSE;
7083 }
else if(*path_ptr ==
'/') {
7085 do_default_action =
FALSE;
7088 if(do_default_action)
7095 if(*result_len+1 > output_len)
7109 hr = IUri_GetPropertyLength(
uri, Uri_PROPERTY_ABSOLUTE_URI, &
len, 0);
7116 if(
len+1 > output_len)
7138 hr = IUri_GetPropertyLength(
uri, Uri_PROPERTY_SCHEME_NAME, &
len, 0);
7145 if(
len+1 > output_len)
7166 hr = IUri_GetPropertyLength(
uri, Uri_PROPERTY_HOST, &
len, 0);
7173 if(
len+1 > output_len)
7194 hr = IUri_GetPropertyLength(
uri, Uri_PROPERTY_DOMAIN, &
len, 0);
7201 if(
len+1 > output_len)
7222 hr = IUri_GetPropertyLength(
uri, Uri_PROPERTY_FRAGMENT, &
len, 0);
7229 if(
len+1 > output_len)
7255 TRACE(
"(%p %d %x %p %d %p %x)\n", pIUri, ParseAction,
dwFlags, pwzResult,
7261 if(!pwzResult || !pIUri) {
7268 FIXME(
"(%p %d %x %p %d %p %x) Unknown IUri's not supported for this action.\n",
7275 hr = IInternetProtocolInfo_ParseUrl(
info,
uri->canon_uri, ParseAction,
dwFlags,
7276 pwzResult, cchResult, pcchResult, 0);
7277 IInternetProtocolInfo_Release(
info);
7281 switch(ParseAction) {
7282 case PARSE_CANONICALIZE:
7285 case PARSE_FRIENDLY:
7288 case PARSE_ROOTDOCUMENT:
7291 case PARSE_DOCUMENT:
7294 case PARSE_PATH_FROM_URL:
7297 case PARSE_URL_FROM_PATH:
7304 hr =
parse_site(pIUri, pwzResult, cchResult, pcchResult);
7309 case PARSE_LOCATION:
7313 case PARSE_SECURITY_URL:
7316 case PARSE_SECURITY_DOMAIN:
7323 FIXME(
"(%p %d %x %p %d %p %x) Partial stub.\n", pIUri, ParseAction,
dwFlags,
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void * heap_realloc(void *mem, size_t len)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
INT WINAPI StrCmpNIW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen)
INT WINAPI StrCmpNW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen)
static const WCHAR slashW[]
static const WCHAR fileW[]
IInternetProtocolInfo * get_protocol_info(LPCWSTR url)
static HRESULT WINAPI UriBuilderFactory_QueryInterface(IUriBuilderFactory *iface, REFIID riid, void **ppv)
static HRESULT get_builder_component(LPWSTR *component, DWORD *component_len, LPCWSTR source, DWORD source_len, LPCWSTR *output, DWORD *output_len)
static HRESULT parse_site(IUri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
static BOOL is_reserved(WCHAR val)
static HRESULT compare_uris(const Uri *a, const Uri *b, BOOL *ret)
static ULONG WINAPI Marshal_AddRef(IMarshal *iface)
static BOOL has_invalid_flag_combination(DWORD flags)
static HRESULT validate_host(const UriBuilder *builder, parse_data *data, DWORD flags)
static BOOL is_unc_path(const WCHAR *str)
void find_domain_name(const WCHAR *host, DWORD host_len, INT *domain_start)
static HRESULT parse_domain(IUri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
static UriBuilder * impl_from_IUriBuilder(IUriBuilder *iface)
#define URI_DISPLAY_NO_DEFAULT_PORT_AUTH
static const IID IID_IUriObj
static BOOL is_hierarchical_uri(const WCHAR **ptr, const parse_data *data)
static void reset_builder(UriBuilder *builder)
static HRESULT WINAPI Marshal_ReleaseMarshalData(IMarshal *iface, IStream *pStm)
static BOOL parse_hierpart(const WCHAR **ptr, parse_data *data, DWORD flags)
static BOOL parse_path_opaque(const WCHAR **ptr, parse_data *data, DWORD flags)
static BOOL is_default_port(URL_SCHEME scheme, DWORD port)
static HRESULT WINAPI Marshal_MarshalInterface(IMarshal *iface, IStream *pStm, REFIID riid, void *pv, DWORD dwDestContext, void *pvDestContext, DWORD mshlflags)
static const IMarshalVtbl MarshalVtbl
static const CHAR hexDigits[]
static HRESULT WINAPI UriBuilder_GetIUri(IUriBuilder *iface, IUri **ppIUri)
static BOOL is_gendelim(WCHAR val)
static int compute_canonicalized_length(const parse_data *data, DWORD flags)
static HRESULT WINAPI Uri_GetPathAndQuery(IUri *iface, BSTR *pstrPathAndQuery)
HRESULT WINAPI CoInternetCombineIUri(IUri *pBaseUri, IUri *pRelativeUri, DWORD dwCombineFlags, IUri **ppCombinedUri, DWORD_PTR dwReserved)
static HRESULT WINAPI Uri_GetPropertyDWORD(IUri *iface, Uri_PROPERTY uriProp, DWORD *pcchProperty, DWORD dwFlags)
#define RAW_URI_FORCE_PORT_DISP
static const IUriBuilderVtbl UriBuilderVtbl
static BOOL parse_path_hierarchical(const WCHAR **ptr, parse_data *data, DWORD flags)
HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, IUri **ppCombinedUri, DWORD_PTR dwReserved)
static BOOL canonicalize_ipv4address(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
static HRESULT WINAPI Marshal_GetUnmarshalClass(IMarshal *iface, REFIID riid, void *pv, DWORD dwDestContext, void *pvDestContext, DWORD mshlflags, CLSID *pCid)
static const IUriVtbl UriVtbl
static BOOL parse_password(const WCHAR **ptr, parse_data *data, DWORD flags, DWORD extras)
static BOOL is_hexdigit(WCHAR val)
static BOOL parse_username(const WCHAR **ptr, parse_data *data, DWORD flags, DWORD extras)
static HRESULT WINAPI UriBuilder_GetPort(IUriBuilder *iface, BOOL *pfHasPort, DWORD *pdwPort)
static HRESULT WINAPI Uri_GetAbsoluteUri(IUri *iface, BSTR *pstrAbsoluteUri)
static HRESULT WINAPI PersistStream_IsDirty(IPersistStream *iface)
static BOOL parse_port(const WCHAR **ptr, parse_data *data, DWORD flags)
static HRESULT WINAPI UriBuilder_GetUserName(IUriBuilder *iface, DWORD *pcchUserName, LPCWSTR *ppwzUserName)
static BOOL canonicalize_userinfo(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
#define URI_DISPLAY_NO_ABSOLUTE_URI
static BOOL is_forbidden_dos_path_char(WCHAR val)
static ULONG WINAPI UriBuilderFactory_AddRef(IUriBuilderFactory *iface)
static HRESULT validate_path(const UriBuilder *builder, parse_data *data, DWORD flags)
static HRESULT combine_uri(Uri *base, Uri *relative, DWORD flags, IUri **result, DWORD extras)
static BOOL check_ipv4address(const WCHAR **ptr, BOOL strict)
static BOOL is_path_delim(URL_SCHEME scheme, WCHAR val)
static HRESULT WINAPI Marshal_DisconnectObject(IMarshal *iface, DWORD dwReserved)
static HRESULT WINAPI PersistStream_Load(IPersistStream *iface, IStream *pStm)
static ULONG WINAPI Marshal_Release(IMarshal *iface)
static BYTE * persist_stream_add_strprop(Uri *This, BYTE *p, DWORD type, DWORD len, WCHAR *data)
HRESULT WINAPI CoInternetParseIUri(IUri *pIUri, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD_PTR dwReserved)
static HRESULT WINAPI UriBuilder_RemoveProperties(IUriBuilder *iface, DWORD dwPropertyMask)
static HRESULT WINAPI Uri_HasProperty(IUri *iface, Uri_PROPERTY uriProp, BOOL *pfHasProperty)
static BOOL parse_authority(const WCHAR **ptr, parse_data *data, DWORD flags)
static HRESULT WINAPI Uri_GetProperties(IUri *iface, DWORD *pdwProperties)
static void persist_stream_save(Uri *This, IStream *pStm, BOOL marshal, struct persist_uri *data)
static HRESULT WINAPI UriBuilder_GetQuery(IUriBuilder *iface, DWORD *pcchQuery, LPCWSTR *ppwzQuery)
static BOOL parse_scheme_name(const WCHAR **ptr, parse_data *data, DWORD extras)
static WCHAR decode_pct_val(const WCHAR *ptr)
static HRESULT WINAPI UriBuilder_SetPath(IUriBuilder *iface, LPCWSTR pwzNewValue)
#define ALLOW_BRACKETLESS_IP_LITERAL
static HRESULT WINAPI UriBuilder_CreateUriWithFlags(IUriBuilder *iface, DWORD dwCreateFlags, DWORD dwUriBuilderFlags, DWORD dwAllowEncodingPropertyMask, DWORD_PTR dwReserved, IUri **ppIUri)
static HRESULT WINAPI UriBuilder_GetPath(IUriBuilder *iface, DWORD *pcchPath, LPCWSTR *ppwzPath)
static HRESULT WINAPI Marshal_GetMarshalSizeMax(IMarshal *iface, REFIID riid, void *pv, DWORD dwDestContext, void *pvDestContext, DWORD mshlflags, DWORD *pSize)
#define COMBINE_URI_FORCE_FLAG_USE
static BOOL canonicalize_authority(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
#define SKIP_IP_FUTURE_CHECK
static BOOL is_auth_delim(WCHAR val, BOOL acceptSlash)
static HRESULT WINAPI UriBuilder_SetIUri(IUriBuilder *iface, IUri *pIUri)
static HRESULT generate_uri(const UriBuilder *builder, const parse_data *data, Uri *uri, DWORD flags)
static HRESULT WINAPI UriBuilder_QueryInterface(IUriBuilder *iface, REFIID riid, void **ppv)
HRESULT WINAPI CreateUriWithFragment(LPCWSTR pwzURI, LPCWSTR pwzFragment, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
static void convert_to_dos_path(const WCHAR *path, DWORD path_len, WCHAR *output, DWORD *output_len)
static BOOL parse_ip_literal(const WCHAR **ptr, parse_data *data, DWORD flags, DWORD extras)
static HRESULT WINAPI Uri_GetQuery(IUri *iface, BSTR *pstrQuery)
#define ALLOW_NULL_TERM_SCHEME
static DWORD ui2str(WCHAR *dest, UINT value)
static const IPersistStreamVtbl PersistStreamVtbl
#define ALLOW_NULL_TERM_USER_NAME
static void compute_ipv6_comps_size(ipv6_address *address)
static void destroy_uri_obj(Uri *This)
static BOOL canonicalize_fragment(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
static UINT ipv4toui(const WCHAR *ip, DWORD len)
static BOOL check_hierarchical(const WCHAR **ptr)
static BOOL parse_reg_name(const WCHAR **ptr, parse_data *data, DWORD flags, DWORD extras)
#define IGNORE_PORT_DELIMITER
static HRESULT WINAPI UriBuilder_SetSchemeName(IUriBuilder *iface, LPCWSTR pwzNewValue)
static const struct @564 recognized_schemes[]
static HRESULT WINAPI Uri_GetZone(IUri *iface, DWORD *pdwZone)
static const struct @565 default_ports[]
static HRESULT parse_anchor(IUri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
static BOOL parse_scheme(const WCHAR **ptr, parse_data *data, DWORD flags, DWORD extras)
static HRESULT WINAPI Marshal_UnmarshalInterface(IMarshal *iface, IStream *pStm, REFIID riid, void **ppv)
HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserved, IUriBuilder **ppIUriBuilder)
static HRESULT WINAPI UriBuilder_CreateUri(IUriBuilder *iface, DWORD dwCreateFlags, DWORD dwAllowEncodingPropertyMask, DWORD_PTR dwReserved, IUri **ppIUri)
static HRESULT WINAPI Uri_IsEqual(IUri *iface, IUri *pUri, BOOL *pfEqual)
static HRESULT WINAPI UriBuilder_GetFragment(IUriBuilder *iface, DWORD *pcchFragment, LPCWSTR *ppwzFragment)
static HRESULT parse_path_from_url(const Uri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
static ULONG WINAPI UriBuilderFactory_Release(IUriBuilderFactory *iface)
static BOOL check_implicit_ipv4(const WCHAR **ptr, UINT *val)
static HRESULT WINAPI Uri_GetDomain(IUri *iface, BSTR *pstrDomain)
static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BSTR *pbstrProperty, DWORD dwFlags)
static HRESULT WINAPI UriBuilder_SetPort(IUriBuilder *iface, BOOL fHasPort, DWORD dwNewValue)
static HRESULT WINAPI Uri_GetPropertyLength(IUri *iface, Uri_PROPERTY uriProp, DWORD *pcchProperty, DWORD dwFlags)
static HRESULT WINAPI Uri_GetUserInfo(IUri *iface, BSTR *pstrUserInfo)
static DWORD canonicalize_path_hierarchical(const WCHAR *path, DWORD path_len, URL_SCHEME scheme_type, BOOL has_host, DWORD flags, BOOL is_implicit_scheme, WCHAR *ret_path)
static BOOL is_unreserved(WCHAR val)
static HRESULT WINAPI UriBuilder_CreateUriSimple(IUriBuilder *iface, DWORD dwAllowEncodingPropertyMask, DWORD_PTR dwReserved, IUri **ppIUri)
static ULONG WINAPI PersistStream_Release(IPersistStream *iface)
static HRESULT WINAPI Uri_GetPassword(IUri *iface, BSTR *pstrPassword)
static HRESULT WINAPI Uri_GetScheme(IUri *iface, DWORD *pdwScheme)
static HRESULT parse_rootdocument(const Uri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
HRESULT Uri_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
static HRESULT validate_userinfo(const UriBuilder *builder, parse_data *data, DWORD flags)
static HRESULT WINAPI Uri_GetUserName(IUri *iface, BSTR *pstrUserName)
static HRESULT WINAPI PersistStream_Save(IPersistStream *iface, IStream *pStm, BOOL fClearDirty)
static BOOL canonicalize_reg_name(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
static BOOL canonicalize_username(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
static Uri * impl_from_IMarshal(IMarshal *iface)
static BOOL is_slash(WCHAR c)
static BOOL ipv6_to_number(const ipv6_address *address, USHORT number[8])
static void apply_default_flags(DWORD *flags)
static BOOL is_implicit_file_path(const WCHAR *str)
static HRESULT validate_query(const UriBuilder *builder, parse_data *data, DWORD flags)
static BOOL parse_scheme_type(parse_data *data)
static HRESULT WINAPI Marshal_QueryInterface(IMarshal *iface, REFIID riid, void **ppvObject)
static BOOL is_hierarchical_scheme(URL_SCHEME type)
#define ALLOW_NULL_TERM_PASSWORD
static void setup_port(const UriBuilder *builder, parse_data *data, DWORD flags)
static Uri * impl_from_IUriBuilderFactory(IUriBuilderFactory *iface)
static HRESULT WINAPI UriBuilderFactory_CreateInitializedIUriBuilder(IUriBuilderFactory *iface, DWORD dwFlags, DWORD_PTR dwReserved, IUriBuilder **ppIUriBuilder)
static HRESULT validate_fragment(const UriBuilder *builder, parse_data *data, DWORD flags)
static HRESULT merge_paths(parse_data *data, const WCHAR *base, DWORD base_len, const WCHAR *relative, DWORD relative_len, WCHAR **result, DWORD *result_len, DWORD flags)
#define RAW_URI_CONVERT_TO_DOS_PATH
static HRESULT WINAPI Uri_GetExtension(IUri *iface, BSTR *pstrExtension)
static BOOL canonicalize_scheme(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
static DWORD generate_raw_uri(const parse_data *data, BSTR uri, DWORD flags)
static BOOL is_subdelim(WCHAR val)
static HRESULT WINAPI Uri_GetPath(IUri *iface, BSTR *pstrPath)
static ULONG WINAPI Uri_Release(IUri *iface)
static BOOL parse_host(const WCHAR **ptr, parse_data *data, DWORD flags, DWORD extras)
static HRESULT WINAPI Uri_GetFragment(IUri *iface, BSTR *pstrFragment)
static BOOL canonicalize_host(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
static ULONG WINAPI UriBuilder_AddRef(IUriBuilder *iface)
static HRESULT WINAPI PersistStream_GetClassID(IPersistStream *iface, CLSID *pClassID)
static Uri * get_uri_obj(IUri *uri)
static DWORD ui2ipv4(WCHAR *dest, UINT address)
static HRESULT parse_canonicalize(const Uri *uri, DWORD flags, LPWSTR output, DWORD output_len, DWORD *result_len)
static ULONG WINAPI PersistStream_AddRef(IPersistStream *iface)
static BOOL parse_fragment(const WCHAR **ptr, parse_data *data, DWORD flags)
static void compute_elision_location(const ipv6_address *address, const USHORT values[8], INT *index, DWORD *count)
static HRESULT WINAPI UriBuilder_SetPassword(IUriBuilder *iface, LPCWSTR pwzNewValue)
static BOOL parse_uri(parse_data *data, DWORD flags)
static HRESULT WINAPI UriBuilder_GetSchemeName(IUriBuilder *iface, DWORD *pcchSchemeName, LPCWSTR *ppwzSchemeName)
static HRESULT WINAPI UriBuilder_HasBeenModified(IUriBuilder *iface, BOOL *pfModified)
static HRESULT WINAPI Uri_GetHost(IUri *iface, BSTR *pstrHost)
static ULONG WINAPI Uri_AddRef(IUri *iface)
static BOOL canonicalize_query(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
static BOOL is_ascii(WCHAR c)
static BOOL parse_ipv4address(const WCHAR **ptr, parse_data *data, DWORD flags)
static BOOL canonicalize_implicit_ipv4address(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
static const IUriBuilderFactoryVtbl UriBuilderFactoryVtbl
static HRESULT WINAPI Uri_GetPort(IUri *iface, DWORD *pdwPort)
static void pct_encode_val(WCHAR val, WCHAR *dest)
static HRESULT validate_password(const UriBuilder *builder, parse_data *data, DWORD flags)
static BOOL check_pct_encoded(const WCHAR **ptr)
static HRESULT WINAPI Uri_GetAuthority(IUri *iface, BSTR *pstrAuthority)
static HRESULT parse_document(const Uri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
static BOOL canonicalize_password(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
static BOOL check_dec_octet(const WCHAR **ptr)
static HRESULT parse_url_from_path(IUri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
static BOOL parse_ipv6address(const WCHAR **ptr, parse_data *data, DWORD flags)
static HRESULT WINAPI UriBuilder_SetFragment(IUriBuilder *iface, LPCWSTR pwzNewValue)
static int hex_to_int(WCHAR val)
static HRESULT validate_scheme_name(const UriBuilder *builder, parse_data *data, DWORD flags)
static BOOL canonicalize_port(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
static HRESULT WINAPI UriBuilderFactory_CreateIUriBuilder(IUriBuilderFactory *iface, DWORD dwFlags, DWORD_PTR dwReserved, IUriBuilder **ppIUriBuilder)
static HRESULT WINAPI UriBuilder_SetHost(IUriBuilder *iface, LPCWSTR pwzNewValue)
static USHORT h16tous(h16 component)
static HRESULT parse_schema(IUri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
static ULONG WINAPI UriBuilder_Release(IUriBuilder *iface)
static HRESULT WINAPI UriBuilder_GetPassword(IUriBuilder *iface, DWORD *pcchPassword, LPCWSTR *ppwzPassword)
static BOOL canonicalize_path_opaque(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
static HRESULT validate_components(const UriBuilder *builder, parse_data *data, DWORD flags)
static Uri * impl_from_IPersistStream(IPersistStream *iface)
static BSTR pre_process_uri(LPCWSTR uri)
static Uri * impl_from_IUri(IUri *iface)
static DWORD remove_dot_segments(WCHAR *path, DWORD path_len)
static HRESULT WINAPI Uri_GetRawUri(IUri *iface, BSTR *pstrRawUri)
static HRESULT parse_friendly(IUri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
static BOOL is_num(WCHAR val)
static BOOL is_drive_path(const WCHAR *str)
static HRESULT WINAPI UriBuilder_SetUserName(IUriBuilder *iface, LPCWSTR pwzNewValue)
static HRESULT WINAPI Uri_GetSchemeName(IUri *iface, BSTR *pstrSchemeName)
static HRESULT build_uri(const UriBuilder *builder, IUri **uri, DWORD create_flags, DWORD use_orig_flags, DWORD encoding_mask)
static INT find_file_extension(const WCHAR *path, DWORD path_len)
static HRESULT WINAPI Uri_QueryInterface(IUri *iface, REFIID riid, void **ppv)
static HRESULT WINAPI UriBuilder_GetHost(IUriBuilder *iface, DWORD *pcchHost, LPCWSTR *ppwzHost)
static HRESULT canonicalize_uri(const parse_data *data, Uri *uri, DWORD flags)
static BOOL parse_query(const WCHAR **ptr, parse_data *data, DWORD flags)
static HRESULT WINAPI PersistStream_GetSizeMax(IPersistStream *iface, ULARGE_INTEGER *pcbSize)
static BOOL canonicalize_hierpart(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
static void parse_userinfo(const WCHAR **ptr, parse_data *data, DWORD flags)
static HRESULT validate_username(const UriBuilder *builder, parse_data *data, DWORD flags)
static HRESULT set_builder_component(LPWSTR *component, DWORD *component_len, LPCWSTR new_value, WCHAR prefix, DWORD *flags, DWORD success_flag)
static BOOL parse_ipvfuture(const WCHAR **ptr, parse_data *data, DWORD flags)
static HRESULT compare_file_paths(const Uri *a, const Uri *b, BOOL *ret)
static HRESULT WINAPI UriBuilder_SetQuery(IUriBuilder *iface, LPCWSTR pwzNewValue)
static HRESULT WINAPI Uri_GetDisplayUri(IUri *iface, BSTR *pstrDisplayUri)
static const struct @566 recognized_tlds[]
static HRESULT WINAPI Uri_GetHostType(IUri *iface, DWORD *pdwHostType)
static HRESULT WINAPI PersistStream_QueryInterface(IPersistStream *iface, REFIID riid, void **ppvObject)
static BOOL canonicalize_ipv6address(const parse_data *data, Uri *uri, DWORD flags, BOOL computeOnly)
#define INTERNET_MAX_URL_LENGTH
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLenum GLuint components
GLboolean GLboolean GLboolean b
GLboolean GLenum GLenum GLvoid * values
GLuint GLsizei GLsizei * length
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static int comp_value(const WCHAR *ptr, int dpc)
_CONST_RETURN wchar_t *__cdecl wmemchr(_In_reads_(_N) const wchar_t *_S, _In_ wchar_t _C, _In_ size_t _N)
static const int digits[]
static const WCHAR nullW[]
#define memcpy(s1, s2, n)
static unsigned int number
static LPWSTR PDWORD pcchPath
#define cmp(status, error)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
static const WCHAR localhostW[]
BSTR WINAPI SysAllocString(LPCOLESTR str)
UINT WINAPI SysStringLen(BSTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
const GUID IID_IPersistStream
#define IsEqualGUID(rguid1, rguid2)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
static const WCHAR wildcardW[]
#define URL_ESCAPE_UNSAFE
@ URL_SCHEME_MSSHELLROOTED
@ URL_SCHEME_MSSHELLIDLIST
#define URL_ESCAPE_SPACES_ONLY
#define URL_DONT_SIMPLIFY
#define URL_FILE_USE_PATHURL
#define URL_DONT_UNESCAPE_EXTRA_INFO
#define URL_ESCAPE_PERCENT
#define STRSAFE_E_INSUFFICIENT_BUFFER
IUriBuilder IUriBuilder_iface
IUriBuilderFactory IUriBuilderFactory_iface
IPersistStream IPersistStream_iface
struct _ULARGE_INTEGER::@4136 u
ipv6_address ipv6_address
#define CONTAINING_RECORD(address, type, field)
struct _LARGE_INTEGER::@2299 u
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject