Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5ca32152
Commit
5ca32152
authored
Dec 02, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Dec 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Implemented PARSE_ANCHOR and PARSE_LOCATION for CoInternetParseIUri.
parent
08b95706
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
1 deletion
+39
-1
uri.c
dlls/urlmon/tests/uri.c
+7
-1
uri.c
dlls/urlmon/uri.c
+32
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
5ca32152
...
...
@@ -5972,7 +5972,13 @@ static const uri_parse_test uri_parse_tests[] = {
{
"http://google.com.uk/"
,
0
,
PARSE_DOMAIN
,
0
,
"google.com.uk"
,
S_OK
,
FALSE
},
{
"http://google.com.com/"
,
0
,
PARSE_DOMAIN
,
0
,
"com.com"
,
S_OK
,
FALSE
},
{
"test/test"
,
Uri_CREATE_ALLOW_RELATIVE
,
PARSE_DOMAIN
,
0
,
""
,
S_OK
,
FALSE
},
{
"file://server/test"
,
0
,
PARSE_DOMAIN
,
0
,
""
,
S_OK
,
FALSE
}
{
"file://server/test"
,
0
,
PARSE_DOMAIN
,
0
,
""
,
S_OK
,
FALSE
},
/* PARSE_LOCATION and PARSE_ANCHOR tests. */
{
"http://google.com/test#Test"
,
0
,
PARSE_ANCHOR
,
0
,
"#Test"
,
S_OK
,
FALSE
},
{
"http://google.com/test#Test"
,
0
,
PARSE_LOCATION
,
0
,
"#Test"
,
S_OK
,
FALSE
},
{
"test"
,
Uri_CREATE_ALLOW_RELATIVE
,
PARSE_ANCHOR
,
0
,
""
,
S_OK
,
FALSE
},
{
"test"
,
Uri_CREATE_ALLOW_RELATIVE
,
PARSE_LOCATION
,
0
,
""
,
S_OK
,
FALSE
}
};
static
inline
LPWSTR
a2w
(
LPCSTR
str
)
{
...
...
dlls/urlmon/uri.c
View file @
5ca32152
...
...
@@ -6468,6 +6468,34 @@ static HRESULT parse_domain(IUri *uri, LPWSTR output, DWORD output_len, DWORD *r
return
S_OK
;
}
static
HRESULT
parse_anchor
(
IUri
*
uri
,
LPWSTR
output
,
DWORD
output_len
,
DWORD
*
result_len
)
{
HRESULT
hr
;
DWORD
len
;
BSTR
received
;
hr
=
IUri_GetPropertyLength
(
uri
,
Uri_PROPERTY_FRAGMENT
,
&
len
,
0
);
if
(
FAILED
(
hr
))
{
*
result_len
=
0
;
return
hr
;
}
*
result_len
=
len
;
if
(
len
+
1
>
output_len
)
return
STRSAFE_E_INSUFFICIENT_BUFFER
;
hr
=
IUri_GetFragment
(
uri
,
&
received
);
if
(
FAILED
(
hr
))
{
*
result_len
=
0
;
return
hr
;
}
memcpy
(
output
,
received
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
SysFreeString
(
received
);
return
S_OK
;
}
/***********************************************************************
* CoInternetParseIUri (urlmon.@)
*/
...
...
@@ -6541,6 +6569,10 @@ HRESULT WINAPI CoInternetParseIUri(IUri *pIUri, PARSEACTION ParseAction, DWORD d
case
PARSE_DOMAIN
:
hr
=
parse_domain
(
pIUri
,
pwzResult
,
cchResult
,
pcchResult
);
break
;
case
PARSE_LOCATION
:
case
PARSE_ANCHOR
:
hr
=
parse_anchor
(
pIUri
,
pwzResult
,
cchResult
,
pcchResult
);
break
;
case
PARSE_SECURITY_URL
:
case
PARSE_MIME
:
case
PARSE_SERVER
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment