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
17ad6aa2
Commit
17ad6aa2
authored
Aug 16, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Move QueryInterface to IShellLinkW.
parent
81b9a83d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
65 deletions
+58
-65
shelllink.c
dlls/shell32/shelllink.c
+58
-65
No files found.
dlls/shell32/shelllink.c
View file @
17ad6aa2
...
...
@@ -229,58 +229,6 @@ static inline LPWSTR strdupW( LPCWSTR src )
}
/**************************************************************************
* ShellLink::QueryInterface implementation
*/
static
HRESULT
ShellLink_QueryInterface
(
IShellLinkImpl
*
This
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
TRACE
(
"(%p)->(
\n\t
IID:
\t
%s)
\n
"
,
This
,
debugstr_guid
(
riid
));
*
ppvObj
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IShellLinkA
))
{
*
ppvObj
=
&
This
->
IShellLinkA_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellLinkW
))
{
*
ppvObj
=
&
This
->
IShellLinkW_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IPersistFile
))
{
*
ppvObj
=
&
This
->
IPersistFile_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IPersistStream
))
{
*
ppvObj
=
&
This
->
IPersistStream_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellLinkDataList
))
{
*
ppvObj
=
&
This
->
IShellLinkDataList_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellExtInit
))
{
*
ppvObj
=
&
This
->
IShellExtInit_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IContextMenu
))
{
*
ppvObj
=
&
This
->
IContextMenu_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IObjectWithSite
))
{
*
ppvObj
=
&
This
->
IObjectWithSite_iface
;
}
if
(
*
ppvObj
)
{
IUnknown_AddRef
((
IUnknown
*
)(
*
ppvObj
));
TRACE
(
"-- Interface: (%p)->(%p)
\n
"
,
ppvObj
,
*
ppvObj
);
return
S_OK
;
}
ERR
(
"-- Interface: E_NOINTERFACE
\n
"
);
return
E_NOINTERFACE
;
}
/**************************************************************************
* IPersistFile_QueryInterface
*/
static
HRESULT
WINAPI
IPersistFile_fnQueryInterface
(
...
...
@@ -289,7 +237,7 @@ static HRESULT WINAPI IPersistFile_fnQueryInterface(
LPVOID
*
ppvObj
)
{
IShellLinkImpl
*
This
=
impl_from_IPersistFile
(
iface
);
return
ShellLink_QueryInterface
(
This
,
riid
,
ppvObj
);
return
IShellLinkW_QueryInterface
(
&
This
->
IShellLinkW_iface
,
riid
,
ppvObj
);
}
/******************************************************************************
...
...
@@ -307,7 +255,7 @@ static ULONG WINAPI IPersistFile_fnAddRef(IPersistFile* iface)
static
ULONG
WINAPI
IPersistFile_fnRelease
(
IPersistFile
*
iface
)
{
IShellLinkImpl
*
This
=
impl_from_IPersistFile
(
iface
);
return
IShellLink
A_Release
(
&
This
->
IShellLinkA
_iface
);
return
IShellLink
W_Release
(
&
This
->
IShellLinkW
_iface
);
}
static
HRESULT
WINAPI
IPersistFile_fnGetClassID
(
IPersistFile
*
iface
,
CLSID
*
pClassID
)
...
...
@@ -510,7 +458,7 @@ static HRESULT WINAPI IPersistStream_fnQueryInterface(
VOID
**
ppvObj
)
{
IShellLinkImpl
*
This
=
impl_from_IPersistStream
(
iface
);
return
ShellLink_QueryInterface
(
This
,
riid
,
ppvObj
);
return
IShellLinkW_QueryInterface
(
&
This
->
IShellLinkW_iface
,
riid
,
ppvObj
);
}
/************************************************************************
...
...
@@ -520,7 +468,7 @@ static ULONG WINAPI IPersistStream_fnRelease(
IPersistStream
*
iface
)
{
IShellLinkImpl
*
This
=
impl_from_IPersistStream
(
iface
);
return
IShellLink
A_Release
(
&
This
->
IShellLinkA
_iface
);
return
IShellLink
W_Release
(
&
This
->
IShellLinkW
_iface
);
}
/************************************************************************
...
...
@@ -1336,7 +1284,7 @@ HRESULT IShellLink_ConstructFromFile( IUnknown* pUnkOuter, REFIID riid,
static
HRESULT
WINAPI
IShellLinkA_fnQueryInterface
(
IShellLinkA
*
iface
,
REFIID
riid
,
void
**
ppvObj
)
{
IShellLinkImpl
*
This
=
impl_from_IShellLinkA
(
iface
);
return
ShellLink_QueryInterface
(
This
,
riid
,
ppvObj
);
return
IShellLinkW_QueryInterface
(
&
This
->
IShellLinkW_iface
,
riid
,
ppvObj
);
}
/******************************************************************************
...
...
@@ -1642,7 +1590,52 @@ static HRESULT WINAPI IShellLinkW_fnQueryInterface(
IShellLinkW
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
IShellLinkImpl
*
This
=
impl_from_IShellLinkW
(
iface
);
return
ShellLink_QueryInterface
(
This
,
riid
,
ppvObj
);
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_guid
(
riid
));
*
ppvObj
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IShellLinkA
))
{
*
ppvObj
=
&
This
->
IShellLinkA_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellLinkW
))
{
*
ppvObj
=
&
This
->
IShellLinkW_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IPersistFile
))
{
*
ppvObj
=
&
This
->
IPersistFile_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IPersistStream
))
{
*
ppvObj
=
&
This
->
IPersistStream_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellLinkDataList
))
{
*
ppvObj
=
&
This
->
IShellLinkDataList_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellExtInit
))
{
*
ppvObj
=
&
This
->
IShellExtInit_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IContextMenu
))
{
*
ppvObj
=
&
This
->
IContextMenu_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IObjectWithSite
))
{
*
ppvObj
=
&
This
->
IObjectWithSite_iface
;
}
if
(
*
ppvObj
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppvObj
);
TRACE
(
"-- Interface: (%p)->(%p)
\n
"
,
ppvObj
,
*
ppvObj
);
return
S_OK
;
}
ERR
(
"-- Interface: E_NOINTERFACE
\n
"
);
return
E_NOINTERFACE
;
}
/******************************************************************************
...
...
@@ -2186,14 +2179,14 @@ static HRESULT WINAPI
ShellLink_DataList_QueryInterface
(
IShellLinkDataList
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
IShellLinkImpl
*
This
=
impl_from_IShellLinkDataList
(
iface
);
return
IShellLink
A_QueryInterface
(
&
This
->
IShellLinkA
_iface
,
riid
,
ppvObject
);
return
IShellLink
W_QueryInterface
(
&
This
->
IShellLinkW
_iface
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
ShellLink_DataList_AddRef
(
IShellLinkDataList
*
iface
)
{
IShellLinkImpl
*
This
=
impl_from_IShellLinkDataList
(
iface
);
return
IShellLink
A_AddRef
(
&
This
->
IShellLinkA
_iface
);
return
IShellLink
W_AddRef
(
&
This
->
IShellLinkW
_iface
);
}
static
ULONG
WINAPI
...
...
@@ -2296,14 +2289,14 @@ static HRESULT WINAPI
ShellLink_ExtInit_QueryInterface
(
IShellExtInit
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
IShellLinkImpl
*
This
=
impl_from_IShellExtInit
(
iface
);
return
IShellLink
A_QueryInterface
(
&
This
->
IShellLinkA
_iface
,
riid
,
ppvObject
);
return
IShellLink
W_QueryInterface
(
&
This
->
IShellLinkW
_iface
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
ShellLink_ExtInit_AddRef
(
IShellExtInit
*
iface
)
{
IShellLinkImpl
*
This
=
impl_from_IShellExtInit
(
iface
);
return
IShellLink
A_AddRef
(
&
This
->
IShellLinkA
_iface
);
return
IShellLink
W_AddRef
(
&
This
->
IShellLinkW
_iface
);
}
static
ULONG
WINAPI
...
...
@@ -2376,14 +2369,14 @@ static HRESULT WINAPI
ShellLink_ContextMenu_QueryInterface
(
IContextMenu
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
IShellLinkImpl
*
This
=
impl_from_IContextMenu
(
iface
);
return
IShellLink
A_QueryInterface
(
&
This
->
IShellLinkA
_iface
,
riid
,
ppvObject
);
return
IShellLink
W_QueryInterface
(
&
This
->
IShellLinkW
_iface
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
ShellLink_ContextMenu_AddRef
(
IContextMenu
*
iface
)
{
IShellLinkImpl
*
This
=
impl_from_IContextMenu
(
iface
);
return
IShellLink
A_AddRef
(
&
This
->
IShellLinkA
_iface
);
return
IShellLink
W_AddRef
(
&
This
->
IShellLinkW
_iface
);
}
static
ULONG
WINAPI
...
...
@@ -2552,7 +2545,7 @@ static HRESULT WINAPI
ShellLink_ObjectWithSite_QueryInterface
(
IObjectWithSite
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
IShellLinkImpl
*
This
=
impl_from_IObjectWithSite
(
iface
);
return
ShellLink_QueryInterface
(
This
,
riid
,
ppvObject
);
return
IShellLinkW_QueryInterface
(
&
This
->
IShellLinkW_iface
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
...
...
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