ole32: Remove now unused helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
42f6be1133
commit
0efea8489d
|
@ -187,7 +187,6 @@ struct oletls
|
|||
|
||||
|
||||
/* Global Interface Table Functions */
|
||||
extern IGlobalInterfaceTable *get_std_git(void) DECLSPEC_HIDDEN;
|
||||
extern void release_std_git(void) DECLSPEC_HIDDEN;
|
||||
extern HRESULT StdGlobalInterfaceTable_GetFactory(LPVOID *ppv) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
|
@ -290,47 +290,38 @@ StdGlobalInterfaceTable_GetInterfaceFromGlobal(
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI GlobalInterfaceTable_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj)
|
||||
{
|
||||
IGlobalInterfaceTable *git = get_std_git();
|
||||
HRESULT hr = IGlobalInterfaceTable_QueryInterface(git, riid, obj);
|
||||
IGlobalInterfaceTable_Release(git);
|
||||
return hr;
|
||||
}
|
||||
|
||||
/* Virtual function table */
|
||||
static const IGlobalInterfaceTableVtbl StdGlobalInterfaceTableImpl_Vtbl =
|
||||
{
|
||||
StdGlobalInterfaceTable_QueryInterface,
|
||||
StdGlobalInterfaceTable_AddRef,
|
||||
StdGlobalInterfaceTable_Release,
|
||||
StdGlobalInterfaceTable_RegisterInterfaceInGlobal,
|
||||
StdGlobalInterfaceTable_RevokeInterfaceFromGlobal,
|
||||
StdGlobalInterfaceTable_GetInterfaceFromGlobal
|
||||
StdGlobalInterfaceTable_QueryInterface,
|
||||
StdGlobalInterfaceTable_AddRef,
|
||||
StdGlobalInterfaceTable_Release,
|
||||
StdGlobalInterfaceTable_RegisterInterfaceInGlobal,
|
||||
StdGlobalInterfaceTable_RevokeInterfaceFromGlobal,
|
||||
StdGlobalInterfaceTable_GetInterfaceFromGlobal
|
||||
};
|
||||
|
||||
IGlobalInterfaceTable* get_std_git(void)
|
||||
HRESULT WINAPI GlobalInterfaceTable_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj)
|
||||
{
|
||||
if (!std_git)
|
||||
{
|
||||
StdGlobalInterfaceTableImpl* newGIT;
|
||||
StdGlobalInterfaceTableImpl *git;
|
||||
|
||||
newGIT = HeapAlloc(GetProcessHeap(), 0, sizeof(StdGlobalInterfaceTableImpl));
|
||||
if (!newGIT) return NULL;
|
||||
|
||||
newGIT->IGlobalInterfaceTable_iface.lpVtbl = &StdGlobalInterfaceTableImpl_Vtbl;
|
||||
list_init(&newGIT->list);
|
||||
newGIT->nextCookie = 0xf100; /* that's where windows starts, so that's where we start */
|
||||
|
||||
if (InterlockedCompareExchangePointer((void**)&std_git, &newGIT->IGlobalInterfaceTable_iface, NULL))
|
||||
if (!std_git)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, newGIT);
|
||||
}
|
||||
else
|
||||
TRACE("Created the GIT at %p\n", newGIT);
|
||||
}
|
||||
git = heap_alloc(sizeof(*git));
|
||||
if (!git) return E_OUTOFMEMORY;
|
||||
|
||||
return std_git;
|
||||
git->IGlobalInterfaceTable_iface.lpVtbl = &StdGlobalInterfaceTableImpl_Vtbl;
|
||||
list_init(&git->list);
|
||||
git->nextCookie = 0xf100; /* that's where windows starts, so that's where we start */
|
||||
|
||||
if (InterlockedCompareExchangePointer((void **)&std_git, &git->IGlobalInterfaceTable_iface, NULL))
|
||||
{
|
||||
heap_free(git);
|
||||
}
|
||||
else
|
||||
TRACE("Created the GIT %p\n", git);
|
||||
}
|
||||
|
||||
return IGlobalInterfaceTable_QueryInterface(std_git, riid, obj);
|
||||
}
|
||||
|
||||
void release_std_git(void)
|
||||
|
|
Loading…
Reference in New Issue