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
c5a73bad
Commit
c5a73bad
authored
Mar 23, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlink: Implement HlinkUpdateStackItem().
parent
2bdaffd8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
108 additions
and
8 deletions
+108
-8
hlink_main.c
dlls/hlink/hlink_main.c
+14
-5
hlink.c
dlls/hlink/tests/hlink.c
+93
-3
hlink.idl
include/hlink.idl
+1
-0
No files found.
dlls/hlink/hlink_main.c
View file @
c5a73bad
...
...
@@ -366,12 +366,21 @@ HRESULT WINAPI HlinkTranslateURL(LPCWSTR pwzURL, DWORD grfFlags, LPWSTR *ppwzTra
/***********************************************************************
* HlinkUpdateStackItem (HLINK.@)
*/
HRESULT
WINAPI
HlinkUpdateStackItem
(
IHlinkFrame
*
pihlframe
,
IHlinkBrowseContext
*
pihl
bc
,
ULONG
uHLID
,
IMoniker
*
pimkTrgt
,
LPCWSTR
pwzLocation
,
LPCWSTR
pwzFriendlyN
ame
)
HRESULT
WINAPI
HlinkUpdateStackItem
(
IHlinkFrame
*
frame
,
IHlinkBrowseContext
*
bc
,
ULONG
hlid
,
IMoniker
*
target
,
LPCWSTR
location
,
LPCWSTR
friendly_n
ame
)
{
FIXME
(
"(%p %p %u %p %s %s)
\n
"
,
pihlframe
,
pihlbc
,
uHLID
,
pimkTrgt
,
debugstr_w
(
pwzLocation
),
debugstr_w
(
pwzFriendlyName
));
return
E_NOTIMPL
;
HRESULT
hr
;
TRACE
(
"(%p %p 0x%x %p %s %s)
\n
"
,
frame
,
bc
,
hlid
,
target
,
debugstr_w
(
location
),
debugstr_w
(
friendly_name
));
if
(
!
frame
&&
!
bc
)
return
E_INVALIDARG
;
if
(
frame
)
hr
=
IHlinkFrame_UpdateHlink
(
frame
,
hlid
,
target
,
location
,
friendly_name
);
else
hr
=
IHlinkBrowseContext_UpdateHlink
(
bc
,
hlid
,
target
,
location
,
friendly_name
);
return
hr
;
}
/***********************************************************************
...
...
dlls/hlink/tests/hlink.c
View file @
c5a73bad
...
...
@@ -68,12 +68,15 @@ DEFINE_EXPECT(Save);
DEFINE_EXPECT
(
HBC_QueryInterface_IHlinkHistory
);
DEFINE_EXPECT
(
HBC_GetObject
);
DEFINE_EXPECT
(
HBC_UpdateHlink
);
DEFINE_EXPECT
(
HT_SetBrowseContext
);
DEFINE_EXPECT
(
HT_GetBrowseContext
);
DEFINE_EXPECT
(
HT_Navigate
);
DEFINE_EXPECT
(
HT_GetFriendlyName
);
DEFINE_EXPECT
(
HLF_UpdateHlink
);
DEFINE_GUID
(
IID_IHlinkHistory
,
0x79eac9c8
,
0xbaf9
,
0x11ce
,
0x8c
,
0x82
,
0x00
,
0xaa
,
0x00
,
0x4b
,
0xa9
,
0x0b
);
static
const
char
*
debugstr_guid
(
REFIID
riid
)
...
...
@@ -885,10 +888,10 @@ static HRESULT WINAPI HlinkBrowseContext_OnNavigateHlink(IHlinkBrowseContext *if
}
static
HRESULT
WINAPI
HlinkBrowseContext_UpdateHlink
(
IHlinkBrowseContext
*
iface
,
ULONG
uHLID
,
IMoniker
*
pimkTarget
,
LPCWSTR
pwzLocation
,
LPCWSTR
pwzFriendlyN
ame
)
IMoniker
*
pimkTarget
,
LPCWSTR
location
,
LPCWSTR
friendly_n
ame
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
CHECK_EXPECT
(
HBC_UpdateHlink
);
return
S_OK
;
}
static
HRESULT
WINAPI
HlinkBrowseContext_EnumNavigationStack
(
IHlinkBrowseContext
*
iface
,
...
...
@@ -2194,6 +2197,92 @@ static void test_Hlink_Navigate(void)
_bctx
=
NULL
;
}
static
HRESULT
WINAPI
hlinkframe_QueryInterface
(
IHlinkFrame
*
iface
,
REFIID
riid
,
void
**
obj
)
{
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IHlinkFrame
))
{
*
obj
=
iface
;
return
S_OK
;
}
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
hlinkframe_AddRef
(
IHlinkFrame
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
hlinkframe_Release
(
IHlinkFrame
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
hlinkframe_SetBrowseContext
(
IHlinkFrame
*
iface
,
IHlinkBrowseContext
*
bc
)
{
ok
(
0
,
"unexpected %p
\n
"
,
bc
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
hlinkframe_GetBrowseContext
(
IHlinkFrame
*
iface
,
IHlinkBrowseContext
**
bc
)
{
*
bc
=
NULL
;
ok
(
0
,
"unexpected %p
\n
"
,
bc
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
hlinkframe_Navigate
(
IHlinkFrame
*
iface
,
DWORD
grfHLNF
,
LPBC
pbc
,
IBindStatusCallback
*
bsc
,
IHlink
*
navigate
)
{
ok
(
0
,
"unexpected
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
hlinkframe_OnNavigate
(
IHlinkFrame
*
iface
,
DWORD
grfHLNF
,
IMoniker
*
target
,
LPCWSTR
location
,
LPCWSTR
friendly_name
,
DWORD
reserved
)
{
ok
(
0
,
"unexpected
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
hlinkframe_UpdateHlink
(
IHlinkFrame
*
iface
,
ULONG
uHLID
,
IMoniker
*
target
,
LPCWSTR
location
,
LPCWSTR
friendly_name
)
{
CHECK_EXPECT
(
HLF_UpdateHlink
);
return
S_OK
;
}
static
IHlinkFrameVtbl
hlinkframevtbl
=
{
hlinkframe_QueryInterface
,
hlinkframe_AddRef
,
hlinkframe_Release
,
hlinkframe_SetBrowseContext
,
hlinkframe_GetBrowseContext
,
hlinkframe_Navigate
,
hlinkframe_OnNavigate
,
hlinkframe_UpdateHlink
};
static
IHlinkFrame
testframe
=
{
&
hlinkframevtbl
};
static
void
test_HlinkUpdateStackItem
(
void
)
{
static
const
WCHAR
location
[]
=
{
'l'
,
'o'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
HRESULT
hr
;
hr
=
HlinkUpdateStackItem
(
NULL
,
NULL
,
HLID_CURRENT
,
&
Moniker
,
location
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
SET_EXPECT
(
HBC_UpdateHlink
);
hr
=
HlinkUpdateStackItem
(
NULL
,
&
HlinkBrowseContext
,
HLID_CURRENT
,
&
Moniker
,
location
,
NULL
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
CHECK_CALLED
(
HBC_UpdateHlink
);
SET_EXPECT
(
HLF_UpdateHlink
);
hr
=
HlinkUpdateStackItem
(
&
testframe
,
&
HlinkBrowseContext
,
HLID_CURRENT
,
&
Moniker
,
location
,
NULL
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
CHECK_CALLED
(
HLF_UpdateHlink
);
}
START_TEST
(
hlink
)
{
CoInitialize
(
NULL
);
...
...
@@ -2213,6 +2302,7 @@ START_TEST(hlink)
test_HlinkClone
();
test_StdHlink
();
test_Hlink_Navigate
();
test_HlinkUpdateStackItem
();
CoUninitialize
();
}
include/hlink.idl
View file @
c5a73bad
...
...
@@ -37,6 +37,7 @@ cpp_quote("HRESULT WINAPI HlinkIsShortcut(LPCWSTR);")
cpp_quote
(
"HRESULT WINAPI HlinkTranslateURL(LPCWSTR,DWORD,LPWSTR*);"
)
cpp_quote
(
"HRESULT WINAPI HlinkParseDisplayName(LPBC,LPCWSTR,BOOL,ULONG*,IMoniker**);"
)
cpp_quote
(
"HRESULT WINAPI HlinkResolveMonikerForData(LPMONIKER,DWORD,LPBC,ULONG,FORMATETC*,IBindStatusCallback*,LPMONIKER);"
)
cpp_quote
(
"HRESULT WINAPI HlinkUpdateStackItem(IHlinkFrame*, IHlinkBrowseContext*, ULONG, IMoniker*, LPCWSTR, LPCWSTR);"
)
typedef
enum
_HLSR_NOREDEF10
{
HLSR_HOME
,
...
...
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