hlink: Moved HLinkBrowseContext_Constructor to avoid vtbl forward declaration.

This commit is contained in:
Jacek Caban 2011-10-21 15:12:21 +02:00 committed by Alexandre Julliard
parent ccc66af6e3
commit 7b2bb14be2
1 changed files with 21 additions and 25 deletions

View File

@ -24,8 +24,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(hlink);
static const IHlinkBrowseContextVtbl hlvt;
typedef struct
{
IHlinkBrowseContext IHlinkBrowseContext_iface;
@ -39,29 +37,6 @@ static inline HlinkBCImpl *impl_from_IHlinkBrowseContext(IHlinkBrowseContext *if
return CONTAINING_RECORD(iface, HlinkBCImpl, IHlinkBrowseContext_iface);
}
HRESULT HLinkBrowseContext_Constructor(IUnknown *pUnkOuter, REFIID riid,
LPVOID *ppv)
{
HlinkBCImpl * hl;
TRACE("unkOut=%p riid=%s\n", pUnkOuter, debugstr_guid(riid));
*ppv = NULL;
if (pUnkOuter)
return CLASS_E_NOAGGREGATION;
hl = heap_alloc_zero(sizeof(HlinkBCImpl));
if (!hl)
return E_OUTOFMEMORY;
hl->ref = 1;
hl->IHlinkBrowseContext_iface.lpVtbl = &hlvt;
*ppv = hl;
return S_OK;
}
static HRESULT WINAPI IHlinkBC_fnQueryInterface( IHlinkBrowseContext *iface,
REFIID riid, LPVOID* ppvObj)
{
@ -297,3 +272,24 @@ static const IHlinkBrowseContextVtbl hlvt =
IHlinkBC_Clone,
IHlinkBC_Close
};
HRESULT HLinkBrowseContext_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv)
{
HlinkBCImpl * hl;
TRACE("unkOut=%p riid=%s\n", pUnkOuter, debugstr_guid(riid));
*ppv = NULL;
if (pUnkOuter)
return CLASS_E_NOAGGREGATION;
hl = heap_alloc_zero(sizeof(HlinkBCImpl));
if (!hl)
return E_OUTOFMEMORY;
hl->ref = 1;
hl->IHlinkBrowseContext_iface.lpVtbl = &hlvt;
*ppv = hl;
return S_OK;
}