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
Hide 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,
...
@@ -80,7 +80,7 @@ HRESULT WINAPI HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation,
IUnknown
*
piunkOuter
,
REFIID
riid
,
void
**
ppvObj
)
IUnknown
*
piunkOuter
,
REFIID
riid
,
void
**
ppvObj
)
{
{
IHlink
*
hl
=
NULL
;
IHlink
*
hl
=
NULL
;
HRESULT
r
;
HRESULT
h
r
;
WCHAR
*
hash
,
*
tgt
;
WCHAR
*
hash
,
*
tgt
;
const
WCHAR
*
loc
;
const
WCHAR
*
loc
;
...
@@ -88,9 +88,9 @@ HRESULT WINAPI HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation,
...
@@ -88,9 +88,9 @@ HRESULT WINAPI HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation,
debugstr_w
(
pwzLocation
),
debugstr_w
(
pwzFriendlyName
),
pihlsite
,
debugstr_w
(
pwzLocation
),
debugstr_w
(
pwzFriendlyName
),
pihlsite
,
dwSiteData
,
piunkOuter
,
debugstr_guid
(
riid
),
ppvObj
);
dwSiteData
,
piunkOuter
,
debugstr_guid
(
riid
),
ppvObj
);
r
=
CoCreateInstance
(
&
CLSID_StdHlink
,
piunkOuter
,
CLSCTX_INPROC_SERVER
,
riid
,
(
LPVOID
*
)
&
hl
);
hr
=
CoCreateInstance
(
&
CLSID_StdHlink
,
piunkOuter
,
CLSCTX_INPROC_SERVER
,
&
IID_IHlink
,
(
void
*
*
)
&
hl
);
if
(
FAILED
(
r
))
if
(
FAILED
(
h
r
))
return
r
;
return
h
r
;
if
(
pwzTarget
)
if
(
pwzTarget
)
{
{
...
@@ -137,10 +137,10 @@ HRESULT WINAPI HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation,
...
@@ -137,10 +137,10 @@ HRESULT WINAPI HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation,
if
(
pihlsite
)
if
(
pihlsite
)
IHlink_SetHlinkSite
(
hl
,
pihlsite
,
dwSiteData
);
IHlink_SetHlinkSite
(
hl
,
pihlsite
,
dwSiteData
);
TRACE
(
"Returning %lx
\n
"
,
r
);
hr
=
IHlink_QueryInterface
(
hl
,
riid
,
ppvObj
);
*
ppvObj
=
hl
;
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)
...
@@ -2623,6 +2623,16 @@ static void test_HlinkCreateFromMoniker(void)
IMoniker_Release
(
moniker
);
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
)
START_TEST
(
hlink
)
{
{
CoInitialize
(
NULL
);
CoInitialize
(
NULL
);
...
@@ -2644,6 +2654,7 @@ START_TEST(hlink)
...
@@ -2644,6 +2654,7 @@ START_TEST(hlink)
test_Hlink_Navigate
();
test_Hlink_Navigate
();
test_HlinkUpdateStackItem
();
test_HlinkUpdateStackItem
();
test_HlinkCreateFromMoniker
();
test_HlinkCreateFromMoniker
();
test_HlinkCreateFromString
();
CoUninitialize
();
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