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
47a70596
Commit
47a70596
authored
Aug 31, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: COM cleanup in shv_bg_cmenu.c.
parent
2cf8335d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
shv_bg_cmenu.c
dlls/shell32/shv_bg_cmenu.c
+18
-15
No files found.
dlls/shell32/shv_bg_cmenu.c
View file @
47a70596
...
...
@@ -42,7 +42,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
*/
typedef
struct
{
const
IContextMenu2Vtbl
*
lpVtbl
;
IContextMenu2
IContextMenu2_iface
;
IShellFolder
*
pSFParent
;
LONG
ref
;
BOOL
bDesktop
;
...
...
@@ -52,6 +52,11 @@ typedef struct
static
const
IContextMenu2Vtbl
cmvt
;
static
inline
BgCmImpl
*
impl_from_IContextMenu2
(
IContextMenu2
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
BgCmImpl
,
IContextMenu2_iface
);
}
/**************************************************************************
* ISVBgCm_Constructor()
*/
...
...
@@ -60,14 +65,14 @@ IContextMenu2 *ISvBgCm_Constructor(IShellFolder* pSFParent, BOOL bDesktop)
BgCmImpl
*
cm
;
cm
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
BgCmImpl
));
cm
->
lpVtbl
=
&
cmvt
;
cm
->
IContextMenu2_iface
.
lpVtbl
=
&
cmvt
;
cm
->
ref
=
1
;
cm
->
pSFParent
=
pSFParent
;
cm
->
bDesktop
=
bDesktop
;
if
(
pSFParent
)
IShellFolder_AddRef
(
pSFParent
);
TRACE
(
"(%p)->()
\n
"
,
cm
);
return
(
IContextMenu2
*
)
cm
;
return
&
cm
->
IContextMenu2_iface
;
}
/**************************************************************************
...
...
@@ -75,7 +80,7 @@ IContextMenu2 *ISvBgCm_Constructor(IShellFolder* pSFParent, BOOL bDesktop)
*/
static
HRESULT
WINAPI
ISVBgCm_fnQueryInterface
(
IContextMenu2
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
BgCmImpl
*
This
=
(
BgCmImpl
*
)
iface
;
BgCmImpl
*
This
=
impl_from_IContextMenu2
(
iface
)
;
TRACE
(
"(%p)->(
\n\t
IID:
\t
%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObj
);
...
...
@@ -107,7 +112,7 @@ static HRESULT WINAPI ISVBgCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid
*/
static
ULONG
WINAPI
ISVBgCm_fnAddRef
(
IContextMenu2
*
iface
)
{
BgCmImpl
*
This
=
(
BgCmImpl
*
)
iface
;
BgCmImpl
*
This
=
impl_from_IContextMenu2
(
iface
)
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%u)
\n
"
,
This
,
refCount
-
1
);
...
...
@@ -120,7 +125,7 @@ static ULONG WINAPI ISVBgCm_fnAddRef(IContextMenu2 *iface)
*/
static
ULONG
WINAPI
ISVBgCm_fnRelease
(
IContextMenu2
*
iface
)
{
BgCmImpl
*
This
=
(
BgCmImpl
*
)
iface
;
BgCmImpl
*
This
=
impl_from_IContextMenu2
(
iface
)
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%i)
\n
"
,
This
,
refCount
+
1
);
...
...
@@ -149,12 +154,11 @@ static HRESULT WINAPI ISVBgCm_fnQueryContextMenu(
UINT
idCmdLast
,
UINT
uFlags
)
{
HMENU
hMyMenu
;
UINT
idMax
;
BgCmImpl
*
This
=
impl_from_IContextMenu2
(
iface
);
HMENU
hMyMenu
;
UINT
idMax
;
HRESULT
hr
;
BgCmImpl
*
This
=
(
BgCmImpl
*
)
iface
;
TRACE
(
"(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )
\n
"
,
This
,
hMenu
,
indexMenu
,
idCmdFirst
,
idCmdLast
,
uFlags
);
...
...
@@ -318,9 +322,8 @@ static HRESULT WINAPI ISVBgCm_fnInvokeCommand(
IContextMenu2
*
iface
,
LPCMINVOKECOMMANDINFO
lpcmi
)
{
BgCmImpl
*
This
=
(
BgCmImpl
*
)
iface
;
LPSHELLBROWSER
lpSB
;
BgCmImpl
*
This
=
impl_from_IContextMenu2
(
iface
);
LPSHELLBROWSER
lpSB
;
LPSHELLVIEW
lpSV
=
NULL
;
HWND
hWndSV
=
0
;
...
...
@@ -405,7 +408,7 @@ static HRESULT WINAPI ISVBgCm_fnGetCommandString(
LPSTR
lpszName
,
UINT
uMaxNameLen
)
{
BgCmImpl
*
This
=
(
BgCmImpl
*
)
iface
;
BgCmImpl
*
This
=
impl_from_IContextMenu2
(
iface
)
;
TRACE
(
"(%p)->(idcom=%lx flags=%x %p name=%p len=%x)
\n
"
,
This
,
idCommand
,
uFlags
,
lpReserved
,
lpszName
,
uMaxNameLen
);
...
...
@@ -437,7 +440,7 @@ static HRESULT WINAPI ISVBgCm_fnHandleMenuMsg(
WPARAM
wParam
,
LPARAM
lParam
)
{
BgCmImpl
*
This
=
(
BgCmImpl
*
)
iface
;
BgCmImpl
*
This
=
impl_from_IContextMenu2
(
iface
)
;
FIXME
(
"(%p)->(msg=%x wp=%lx lp=%lx)
\n
"
,
This
,
uMsg
,
wParam
,
lParam
);
...
...
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