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
215bd9a7
Commit
215bd9a7
authored
Jun 14, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the IContextMenu interface to the ShellLink object.
parent
4b109866
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
0 deletions
+79
-0
shelllink.c
dlls/shell32/shelllink.c
+79
-0
No files found.
dlls/shell32/shelllink.c
View file @
215bd9a7
...
...
@@ -119,6 +119,7 @@ static const IPersistFileVtbl pfvt;
static
const
IPersistStreamVtbl
psvt
;
static
const
IShellLinkDataListVtbl
dlvt
;
static
const
IShellExtInitVtbl
eivt
;
static
const
IContextMenuVtbl
cmvt
;
/* IShellLink Implementation */
...
...
@@ -130,6 +131,7 @@ typedef struct
const
IPersistStreamVtbl
*
lpvtblPersistStream
;
const
IShellLinkDataListVtbl
*
lpvtblShellLinkDataList
;
const
IShellExtInitVtbl
*
lpvtblShellExtInit
;
const
IContextMenuVtbl
*
lpvtblContextMenu
;
DWORD
ref
;
...
...
@@ -190,6 +192,13 @@ static inline IShellLinkImpl *impl_from_IShellExtInit( IShellExtInit *iface )
#define _ICOM_THIS_From_IShellExtInit(class, iface) \
class* This = impl_from_IShellExtInit( iface )
static
inline
IShellLinkImpl
*
impl_from_IContextMenu
(
IContextMenu
*
iface
)
{
return
(
IShellLinkImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
IShellLinkImpl
,
lpvtblContextMenu
));
}
#define _ICOM_THIS_From_IContextMenu(class, iface) \
class* This = impl_from_IContextMenu( iface )
static
HRESULT
ShellLink_UpdatePath
(
LPWSTR
sPathRel
,
LPCWSTR
path
,
LPCWSTR
sWorkDir
,
LPWSTR
*
psPath
);
/* strdup on the process heap */
...
...
@@ -1084,6 +1093,7 @@ HRESULT WINAPI IShellLink_Constructor( IUnknown *pUnkOuter,
sl
->
lpvtblPersistStream
=
&
psvt
;
sl
->
lpvtblShellLinkDataList
=
&
dlvt
;
sl
->
lpvtblShellExtInit
=
&
eivt
;
sl
->
lpvtblContextMenu
=
&
cmvt
;
sl
->
iShowCmd
=
SW_SHOWNORMAL
;
sl
->
bDirty
=
FALSE
;
...
...
@@ -1236,6 +1246,10 @@ static HRESULT WINAPI IShellLinkA_fnQueryInterface( IShellLinkA * iface, REFIID
{
*
ppvObj
=
&
(
This
->
lpvtblShellExtInit
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IContextMenu
))
{
*
ppvObj
=
&
(
This
->
lpvtblContextMenu
);
}
if
(
*
ppvObj
)
{
...
...
@@ -2313,3 +2327,68 @@ static const IShellExtInitVtbl eivt =
ShellLink_ExtInit_Release
,
ShellLink_ExtInit_Initialize
};
static
HRESULT
WINAPI
ShellLink_ContextMenu_QueryInterface
(
IContextMenu
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
_ICOM_THIS_From_IContextMenu
(
IShellLinkImpl
,
iface
);
return
IShellLinkA_QueryInterface
((
IShellLinkA
*
)
This
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
ShellLink_ContextMenu_AddRef
(
IContextMenu
*
iface
)
{
_ICOM_THIS_From_IContextMenu
(
IShellLinkImpl
,
iface
);
return
IShellLinkA_AddRef
((
IShellLinkA
*
)
This
);
}
static
ULONG
WINAPI
ShellLink_ContextMenu_Release
(
IContextMenu
*
iface
)
{
_ICOM_THIS_From_IContextMenu
(
IShellLinkImpl
,
iface
);
return
IShellLinkA_Release
((
IShellLinkA
*
)
This
);
}
static
HRESULT
WINAPI
ShellLink_QueryContextMenu
(
IContextMenu
*
iface
,
HMENU
hmenu
,
UINT
indexMenu
,
UINT
idCmdFirst
,
UINT
idCmdLast
,
UINT
uFlags
)
{
_ICOM_THIS_From_IContextMenu
(
IShellLinkImpl
,
iface
);
FIXME
(
"%p %p %u %u %u %u
\n
"
,
This
,
hmenu
,
indexMenu
,
idCmdFirst
,
idCmdLast
,
uFlags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ShellLink_InvokeCommand
(
IContextMenu
*
iface
,
LPCMINVOKECOMMANDINFO
lpici
)
{
_ICOM_THIS_From_IContextMenu
(
IShellLinkImpl
,
iface
);
FIXME
(
"%p %p
\n
"
,
This
,
lpici
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ShellLink_GetCommandString
(
IContextMenu
*
iface
,
UINT
idCmd
,
UINT
uType
,
UINT
*
pwReserved
,
LPSTR
pszName
,
UINT
cchMax
)
{
_ICOM_THIS_From_IContextMenu
(
IShellLinkImpl
,
iface
);
FIXME
(
"%p %u %u %p %p %u
\n
"
,
This
,
idCmd
,
uType
,
pwReserved
,
pszName
,
cchMax
);
return
E_NOTIMPL
;
}
static
const
IContextMenuVtbl
cmvt
=
{
ShellLink_ContextMenu_QueryInterface
,
ShellLink_ContextMenu_AddRef
,
ShellLink_ContextMenu_Release
,
ShellLink_QueryContextMenu
,
ShellLink_InvokeCommand
,
ShellLink_GetCommandString
};
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