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
500e4fae
Commit
500e4fae
authored
Dec 02, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Dec 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Implemented PARSE_SITE for CoInternetParseIUri.
parent
a77f1590
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
uri.c
dlls/urlmon/tests/uri.c
+7
-1
uri.c
dlls/urlmon/uri.c
+31
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
500e4fae
...
...
@@ -5960,7 +5960,13 @@ static const uri_parse_test uri_parse_tests[] = {
/* PARSE_SCHEMA tests. */
{
"http://google.com/test"
,
0
,
PARSE_SCHEMA
,
0
,
"http"
,
S_OK
,
FALSE
},
{
"test"
,
Uri_CREATE_ALLOW_RELATIVE
,
PARSE_SCHEMA
,
0
,
""
,
S_OK
,
FALSE
}
{
"test"
,
Uri_CREATE_ALLOW_RELATIVE
,
PARSE_SCHEMA
,
0
,
""
,
S_OK
,
FALSE
},
/* PARSE_SITE tests. */
{
"http://google.uk.com/"
,
0
,
PARSE_SITE
,
0
,
"google.uk.com"
,
S_OK
,
FALSE
},
{
"http://google.com.com/"
,
0
,
PARSE_SITE
,
0
,
"google.com.com"
,
S_OK
,
FALSE
},
{
"google.com"
,
Uri_CREATE_ALLOW_RELATIVE
,
PARSE_SITE
,
0
,
""
,
S_OK
,
FALSE
},
{
"file://server/test"
,
0
,
PARSE_SITE
,
0
,
"server"
,
S_OK
,
FALSE
}
};
static
inline
LPWSTR
a2w
(
LPCSTR
str
)
{
...
...
dlls/urlmon/uri.c
View file @
500e4fae
...
...
@@ -6414,6 +6414,34 @@ static HRESULT parse_schema(IUri *uri, LPWSTR output, DWORD output_len,
return
S_OK
;
}
static
HRESULT
parse_site
(
IUri
*
uri
,
LPWSTR
output
,
DWORD
output_len
,
DWORD
*
result_len
)
{
HRESULT
hr
;
DWORD
len
;
BSTR
received
;
hr
=
IUri_GetPropertyLength
(
uri
,
Uri_PROPERTY_HOST
,
&
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_GetHost
(
uri
,
&
received
);
if
(
FAILED
(
hr
))
{
*
result_len
=
0
;
return
hr
;
}
memcpy
(
output
,
received
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
SysFreeString
(
received
);
return
S_OK
;
}
/***********************************************************************
* CoInternetParseIUri (urlmon.@)
*/
...
...
@@ -6481,6 +6509,9 @@ HRESULT WINAPI CoInternetParseIUri(IUri *pIUri, PARSEACTION ParseAction, DWORD d
case
PARSE_SCHEMA
:
hr
=
parse_schema
(
pIUri
,
pwzResult
,
cchResult
,
pcchResult
);
break
;
case
PARSE_SITE
:
hr
=
parse_site
(
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