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
a08be2a2
Commit
a08be2a2
authored
Apr 11, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlink: Return requested interface from HlinkCreateFromString().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
19f802c0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
hlink_main.c
dlls/hlink/hlink_main.c
+7
-7
hlink.c
dlls/hlink/tests/hlink.c
+11
-0
No files found.
dlls/hlink/hlink_main.c
View file @
a08be2a2
...
...
@@ -80,7 +80,7 @@ HRESULT WINAPI HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation,
IUnknown
*
piunkOuter
,
REFIID
riid
,
void
**
ppvObj
)
{
IHlink
*
hl
=
NULL
;
HRESULT
r
;
HRESULT
h
r
;
WCHAR
*
hash
,
*
tgt
;
const
WCHAR
*
loc
;
...
...
@@ -88,9 +88,9 @@ HRESULT WINAPI HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation,
debugstr_w
(
pwzLocation
),
debugstr_w
(
pwzFriendlyName
),
pihlsite
,
dwSiteData
,
piunkOuter
,
debugstr_guid
(
riid
),
ppvObj
);
r
=
CoCreateInstance
(
&
CLSID_StdHlink
,
piunkOuter
,
CLSCTX_INPROC_SERVER
,
riid
,
(
LPVOID
*
)
&
hl
);
if
(
FAILED
(
r
))
return
r
;
hr
=
CoCreateInstance
(
&
CLSID_StdHlink
,
piunkOuter
,
CLSCTX_INPROC_SERVER
,
&
IID_IHlink
,
(
void
*
*
)
&
hl
);
if
(
FAILED
(
h
r
))
return
h
r
;
if
(
pwzTarget
)
{
...
...
@@ -137,10 +137,10 @@ HRESULT WINAPI HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation,
if
(
pihlsite
)
IHlink_SetHlinkSite
(
hl
,
pihlsite
,
dwSiteData
);
TRACE
(
"Returning %lx
\n
"
,
r
);
*
ppvObj
=
hl
;
hr
=
IHlink_QueryInterface
(
hl
,
riid
,
ppvObj
);
IHlink_Release
(
hl
)
;
return
r
;
return
h
r
;
}
...
...
dlls/hlink/tests/hlink.c
View file @
a08be2a2
...
...
@@ -2623,6 +2623,16 @@ static void test_HlinkCreateFromMoniker(void)
IMoniker_Release
(
moniker
);
}
static
void
test_HlinkCreateFromString
(
void
)
{
IPersistStream
*
stream
;
HRESULT
hr
;
hr
=
HlinkCreateFromString
(
L"http://winehq.org"
,
NULL
,
NULL
,
NULL
,
0
,
NULL
,
&
IID_IPersistStream
,
(
void
**
)
&
stream
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IPersistStream_Release
(
stream
);
}
START_TEST
(
hlink
)
{
CoInitialize
(
NULL
);
...
...
@@ -2644,6 +2654,7 @@ START_TEST(hlink)
test_Hlink_Navigate
();
test_HlinkUpdateStackItem
();
test_HlinkCreateFromMoniker
();
test_HlinkCreateFromString
();
CoUninitialize
();
}
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