Commit 6419969c authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

shell32: Move ISvBgCm_Constructor() to avoid a forward declaration.

parent 47a70596
...@@ -49,33 +49,12 @@ typedef struct ...@@ -49,33 +49,12 @@ typedef struct
UINT verb_offset; UINT verb_offset;
} BgCmImpl; } BgCmImpl;
static const IContextMenu2Vtbl cmvt;
static inline BgCmImpl *impl_from_IContextMenu2(IContextMenu2 *iface) static inline BgCmImpl *impl_from_IContextMenu2(IContextMenu2 *iface)
{ {
return CONTAINING_RECORD(iface, BgCmImpl, IContextMenu2_iface); return CONTAINING_RECORD(iface, BgCmImpl, IContextMenu2_iface);
} }
/************************************************************************** /**************************************************************************
* ISVBgCm_Constructor()
*/
IContextMenu2 *ISvBgCm_Constructor(IShellFolder* pSFParent, BOOL bDesktop)
{
BgCmImpl* cm;
cm = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(BgCmImpl));
cm->IContextMenu2_iface.lpVtbl = &cmvt;
cm->ref = 1;
cm->pSFParent = pSFParent;
cm->bDesktop = bDesktop;
if(pSFParent) IShellFolder_AddRef(pSFParent);
TRACE("(%p)->()\n",cm);
return &cm->IContextMenu2_iface;
}
/**************************************************************************
* ISVBgCm_fnQueryInterface * ISVBgCm_fnQueryInterface
*/ */
static HRESULT WINAPI ISVBgCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID *ppvObj) static HRESULT WINAPI ISVBgCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID *ppvObj)
...@@ -461,3 +440,18 @@ static const IContextMenu2Vtbl cmvt = ...@@ -461,3 +440,18 @@ static const IContextMenu2Vtbl cmvt =
ISVBgCm_fnGetCommandString, ISVBgCm_fnGetCommandString,
ISVBgCm_fnHandleMenuMsg ISVBgCm_fnHandleMenuMsg
}; };
IContextMenu2 *ISvBgCm_Constructor(IShellFolder *pSFParent, BOOL bDesktop)
{
BgCmImpl *cm;
cm = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cm));
cm->IContextMenu2_iface.lpVtbl = &cmvt;
cm->ref = 1;
cm->pSFParent = pSFParent;
cm->bDesktop = bDesktop;
if(pSFParent) IShellFolder_AddRef(pSFParent);
TRACE("(%p)->()\n", cm);
return &cm->IContextMenu2_iface;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment