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
41c58b5a
Commit
41c58b5a
authored
Nov 12, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Nov 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added pluggable protocol support to CoInternetCombineUrlEx.
parent
90738c34
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
4 deletions
+55
-4
uri.c
dlls/urlmon/tests/uri.c
+39
-4
uri.c
dlls/urlmon/uri.c
+16
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
41c58b5a
...
...
@@ -9255,8 +9255,6 @@ static void test_CoInternetCombineIUri_Pluggable(void) {
HRESULT
hr
;
IUri
*
base
=
NULL
;
register_protocols
();
hr
=
pCreateUri
(
combine_baseW
,
0
,
0
,
&
base
);
ok
(
SUCCEEDED
(
hr
),
"Error: CreateUri returned 0x%08x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
...
...
@@ -9290,8 +9288,6 @@ static void test_CoInternetCombineIUri_Pluggable(void) {
if
(
relative
)
IUri_Release
(
relative
);
}
if
(
base
)
IUri_Release
(
base
);
unregister_protocols
();
}
static
void
test_CoInternetCombineUrlEx
(
void
)
{
...
...
@@ -9413,6 +9409,38 @@ static void test_CoInternetCombineUrlEx(void) {
}
}
static
void
test_CoInternetCombineUrlEx_Pluggable
(
void
)
{
HRESULT
hr
;
IUri
*
base
=
NULL
;
hr
=
pCreateUri
(
combine_baseW
,
0
,
0
,
&
base
);
ok
(
SUCCEEDED
(
hr
),
"Error: CreateUri returned 0x%08x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
IUri
*
result
=
NULL
;
SET_EXPECT
(
CombineUrl
);
hr
=
pCoInternetCombineUrlEx
(
base
,
combine_relativeW
,
URL_DONT_SIMPLIFY
|
URL_FILE_USE_PATHURL
|
URL_DONT_UNESCAPE_EXTRA_INFO
,
&
result
,
0
);
ok
(
hr
==
S_OK
,
"Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
S_OK
);
CHECK_CALLED
(
CombineUrl
);
if
(
SUCCEEDED
(
hr
))
{
BSTR
received
=
NULL
;
hr
=
IUri_GetAbsoluteUri
(
result
,
&
received
);
ok
(
hr
==
S_OK
,
"Error: Expected S_OK, but got 0x%08x instead.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
ok
(
!
lstrcmpW
(
combine_resultW
,
received
),
"Error: Expected %s, but got %s.
\n
"
,
wine_dbgstr_w
(
combine_resultW
),
wine_dbgstr_w
(
received
));
}
SysFreeString
(
received
);
}
if
(
result
)
IUri_Release
(
result
);
}
if
(
base
)
IUri_Release
(
base
);
}
START_TEST
(
uri
)
{
HMODULE
hurlmon
;
...
...
@@ -9501,6 +9529,13 @@ START_TEST(uri) {
trace
(
"test CoInternetCombineUrlEx...
\n
"
);
test_CoInternetCombineUrlEx
();
register_protocols
();
trace
(
"test CoInternetCombineIUri pluggable...
\n
"
);
test_CoInternetCombineIUri_Pluggable
();
trace
(
"test CoInternetCombineUrlEx Pluggable...
\n
"
);
test_CoInternetCombineUrlEx_Pluggable
();
unregister_protocols
();
}
dlls/urlmon/uri.c
View file @
41c58b5a
...
...
@@ -6028,6 +6028,7 @@ HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DW
IUri
*
relative
;
Uri
*
base
;
HRESULT
hr
;
IInternetProtocolInfo
*
info
;
TRACE
(
"(%p %s %x %p %x) stub
\n
"
,
pBaseUri
,
debugstr_w
(
pwzRelativeUrl
),
dwCombineFlags
,
ppCombinedUri
,
(
DWORD
)
dwReserved
);
...
...
@@ -6053,6 +6054,21 @@ HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DW
return
E_NOTIMPL
;
}
info
=
get_protocol_info
(
base
->
canon_uri
);
if
(
info
)
{
WCHAR
result
[
INTERNET_MAX_URL_LENGTH
+
1
];
DWORD
result_len
=
0
;
hr
=
IInternetProtocolInfo_CombineUrl
(
info
,
base
->
canon_uri
,
pwzRelativeUrl
,
dwCombineFlags
,
result
,
INTERNET_MAX_URL_LENGTH
+
1
,
&
result_len
,
0
);
IInternetProtocolInfo_Release
(
info
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
CreateUri
(
result
,
Uri_CREATE_ALLOW_RELATIVE
,
0
,
ppCombinedUri
);
if
(
SUCCEEDED
(
hr
))
return
hr
;
}
}
hr
=
CreateUri
(
pwzRelativeUrl
,
Uri_CREATE_ALLOW_RELATIVE
,
0
,
&
relative
);
if
(
FAILED
(
hr
))
{
*
ppCombinedUri
=
NULL
;
...
...
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