Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
19f802c0
Commit
19f802c0
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 correct requested interface from HlinkCreateFromMoniker().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bbb9c273
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
+24
-8
hlink_main.c
dlls/hlink/hlink_main.c
+7
-8
hlink.c
dlls/hlink/tests/hlink.c
+17
-0
No files found.
dlls/hlink/hlink_main.c
View file @
19f802c0
...
...
@@ -49,15 +49,15 @@ HRESULT WINAPI HlinkCreateFromMoniker( IMoniker *pimkTrgt, LPCWSTR pwzLocation,
IUnknown
*
piunkOuter
,
REFIID
riid
,
void
**
ppvObj
)
{
IHlink
*
hl
=
NULL
;
HRESULT
r
;
HRESULT
h
r
;
TRACE
(
"%p %s %s %p %li %p %s %p
\n
"
,
pimkTrgt
,
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
,
(
LPVOID
*
)
&
hl
);
if
(
FAILED
(
h
r
))
return
h
r
;
IHlink_SetMonikerReference
(
hl
,
HLINKSETF_LOCATION
|
HLINKSETF_TARGET
,
pimkTrgt
,
pwzLocation
);
...
...
@@ -66,11 +66,10 @@ HRESULT WINAPI HlinkCreateFromMoniker( IMoniker *pimkTrgt, LPCWSTR pwzLocation,
if
(
pihlsite
)
IHlink_SetHlinkSite
(
hl
,
pihlsite
,
dwSiteData
);
*
ppvObj
=
hl
;
TRACE
(
"Returning %lx
\n
"
,
r
);
hr
=
IHlink_QueryInterface
(
hl
,
riid
,
ppvObj
);
IHlink_Release
(
hl
);
return
r
;
return
h
r
;
}
/***********************************************************************
...
...
dlls/hlink/tests/hlink.c
View file @
19f802c0
...
...
@@ -2607,6 +2607,22 @@ static void test_HlinkUpdateStackItem(void)
CHECK_CALLED
(
HLF_UpdateHlink
);
}
static
void
test_HlinkCreateFromMoniker
(
void
)
{
IPersistStream
*
stream
;
IMoniker
*
moniker
;
HRESULT
hr
;
hr
=
CreateItemMoniker
(
L"1"
,
L"1"
,
&
moniker
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
HlinkCreateFromMoniker
(
moniker
,
L"1"
,
L"a"
,
NULL
,
0
,
NULL
,
&
IID_IPersistStream
,
(
void
**
)
&
stream
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IPersistStream_Release
(
stream
);
IMoniker_Release
(
moniker
);
}
START_TEST
(
hlink
)
{
CoInitialize
(
NULL
);
...
...
@@ -2627,6 +2643,7 @@ START_TEST(hlink)
test_StdHlink
();
test_Hlink_Navigate
();
test_HlinkUpdateStackItem
();
test_HlinkCreateFromMoniker
();
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