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
d4eb4f54
Commit
d4eb4f54
authored
Jun 13, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 13, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- add the IShellExtInit interface to the ShellLink object
- use inline functions rather than macros to resolve the implementation pointer from an interface pointer
parent
29056637
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
15 deletions
+76
-15
shelllink.c
dlls/shell32/shelllink.c
+76
-15
No files found.
dlls/shell32/shelllink.c
View file @
d4eb4f54
...
...
@@ -117,6 +117,7 @@ static const IShellLinkWVtbl slvtw;
static
const
IPersistFileVtbl
pfvt
;
static
const
IPersistStreamVtbl
psvt
;
static
const
IShellLinkDataListVtbl
dlvt
;
static
const
IShellExtInitVtbl
eivt
;
/* IShellLink Implementation */
...
...
@@ -127,6 +128,7 @@ typedef struct
const
IPersistFileVtbl
*
lpvtblPersistFile
;
const
IPersistStreamVtbl
*
lpvtblPersistStream
;
const
IShellLinkDataListVtbl
*
lpvtblShellLinkDataList
;
const
IShellExtInitVtbl
*
lpvtblShellExtInit
;
DWORD
ref
;
...
...
@@ -152,24 +154,40 @@ typedef struct
BOOL
bDirty
;
}
IShellLinkImpl
;
#define _IShellLinkW_Offset ((int)(&(((IShellLinkImpl*)0)->lpvtblw)))
#define _ICOM_THIS_From_IShellLinkW(class, name) \
class* This = (class*)(((char*)name)-_IShellLinkW_Offset)
static
inline
IShellLinkImpl
*
impl_from_IShellLinkW
(
IShellLinkW
*
iface
)
{
return
(
IShellLinkImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
IShellLinkImpl
,
lpvtblw
));
}
#define _ICOM_THIS_From_IShellLinkW(class, iface) \
class* This = impl_from_IShellLinkW( iface )
#define _IPersistFile_Offset \
((int)(&(((IShellLinkImpl*)0)->lpvtblPersistFile)))
#define _ICOM_THIS_From_IPersistFile(class, name) \
class* This = (class*)(((char*)name)-_IPersistFile_Offset)
static
inline
IShellLinkImpl
*
impl_from_IPersistFile
(
IPersistFile
*
iface
)
{
return
(
IShellLinkImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
IShellLinkImpl
,
lpvtblPersistFile
));
}
#define _ICOM_THIS_From_IPersistFile(class, iface) \
class* This = impl_from_IPersistFile( iface )
#define _IPersistStream_Offset \
((int)(&(((IShellLinkImpl*)0)->lpvtblPersistStream)))
#define _ICOM_THIS_From_IPersistStream(class, name) \
class* This = (class*)(((char*)name)-_IPersistStream_Offset)
static
inline
IShellLinkImpl
*
impl_from_IPersistStream
(
IPersistStream
*
iface
)
{
return
(
IShellLinkImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
IShellLinkImpl
,
lpvtblPersistStream
));
}
#define _ICOM_THIS_From_IPersistStream(class, iface) \
class* This = impl_from_IPersistStream( iface )
static
inline
IShellLinkImpl
*
impl_from_IShellLinkDataList
(
IShellLinkDataList
*
iface
)
{
return
(
IShellLinkImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
IShellLinkImpl
,
lpvtblShellLinkDataList
));
}
#define _ICOM_THIS_From_IShellLinkDataList(class, iface) \
class* This = impl_from_IShellLinkDataList( iface )
#define _IShellLinkDataList_Offset \
((int)(&(((IShellLinkImpl*)0)->lpvtblShellLinkDataList)))
#define _ICOM_THIS_From_IShellLinkDataList(class, name) \
class* This = (class*)(((char*)name)-_IShellLinkDataList_Offset)
static
inline
IShellLinkImpl
*
impl_from_IShellExtInit
(
IShellExtInit
*
iface
)
{
return
(
IShellLinkImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
IShellLinkImpl
,
lpvtblShellExtInit
));
}
#define _ICOM_THIS_From_IShellExtInit(class, iface) \
class* This = impl_from_IShellExtInit( iface )
static
HRESULT
ShellLink_UpdatePath
(
LPWSTR
sPathRel
,
LPCWSTR
path
,
LPCWSTR
sWorkDir
,
LPWSTR
*
psPath
);
...
...
@@ -1064,6 +1082,7 @@ HRESULT WINAPI IShellLink_Constructor( IUnknown *pUnkOuter,
sl
->
lpvtblPersistFile
=
&
pfvt
;
sl
->
lpvtblPersistStream
=
&
psvt
;
sl
->
lpvtblShellLinkDataList
=
&
dlvt
;
sl
->
lpvtblShellExtInit
=
&
eivt
;
sl
->
iShowCmd
=
SW_SHOWNORMAL
;
sl
->
bDirty
=
FALSE
;
...
...
@@ -1212,6 +1231,10 @@ static HRESULT WINAPI IShellLinkA_fnQueryInterface( IShellLinkA * iface, REFIID
{
*
ppvObj
=
&
(
This
->
lpvtblShellLinkDataList
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellExtInit
))
{
*
ppvObj
=
&
(
This
->
lpvtblShellExtInit
);
}
if
(
*
ppvObj
)
{
...
...
@@ -2209,3 +2232,41 @@ static const IShellLinkDataListVtbl dlvt =
ShellLink_GetFlags
,
ShellLink_SetFlags
};
static
HRESULT
WINAPI
ShellLink_ExtInit_QueryInterface
(
IShellExtInit
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
_ICOM_THIS_From_IShellExtInit
(
IShellLinkImpl
,
iface
);
return
IShellLinkA_QueryInterface
((
IShellLinkA
*
)
This
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
ShellLink_ExtInit_AddRef
(
IShellExtInit
*
iface
)
{
_ICOM_THIS_From_IShellExtInit
(
IShellLinkImpl
,
iface
);
return
IShellLinkA_AddRef
((
IShellLinkA
*
)
This
);
}
static
ULONG
WINAPI
ShellLink_ExtInit_Release
(
IShellExtInit
*
iface
)
{
_ICOM_THIS_From_IShellExtInit
(
IShellLinkImpl
,
iface
);
return
IShellLinkA_Release
((
IShellLinkA
*
)
This
);
}
static
HRESULT
WINAPI
ShellLink_ExtInit_Initialize
(
IShellExtInit
*
iface
,
LPCITEMIDLIST
pidlFolder
,
IDataObject
*
pdtobj
,
HKEY
hkeyProgID
)
{
_ICOM_THIS_From_IShellExtInit
(
IShellLinkImpl
,
iface
);
FIXME
(
"%p %p %p %p
\n
"
,
This
,
pidlFolder
,
pdtobj
,
hkeyProgID
);
return
E_NOTIMPL
;
}
static
const
IShellExtInitVtbl
eivt
=
{
ShellLink_ExtInit_QueryInterface
,
ShellLink_ExtInit_AddRef
,
ShellLink_ExtInit_Release
,
ShellLink_ExtInit_Initialize
};
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