Module: wine Branch: master Commit: 0ce5ab71b097c6f397b82293aeb1aeaab7f28fd4 URL: https://source.winehq.org/git/wine.git/?a=commit;h=0ce5ab71b097c6f397b82293a...
Author: Zebediah Figura z.figura12@gmail.com Date: Thu Jun 6 19:49:26 2019 -0400
strmbase: Get rid of base IDispatch implementation.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/strmbase/dispatch.c | 53 ++-------------------------------------- dlls/strmbase/strmbase_private.h | 8 ------ include/wine/strmbase.h | 4 --- 3 files changed, 2 insertions(+), 63 deletions(-)
diff --git a/dlls/strmbase/dispatch.c b/dlls/strmbase/dispatch.c index 1521471..25573fa 100644 --- a/dlls/strmbase/dispatch.c +++ b/dlls/strmbase/dispatch.c @@ -1,7 +1,7 @@ /* - * Generic Implementation of IDispatch for strmbase classes + * ITypeInfo cache for IDispatch * - * Copyright 2012 Aric Stewart, CodeWeavers + * Copyright 2019 Zebediah Figura * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -68,52 +68,3 @@ HRESULT strmbase_get_typeinfo(enum strmbase_type_id tid, ITypeInfo **ret) ITypeInfo_AddRef(*ret = control_typeinfo[tid]); return S_OK; } - -HRESULT WINAPI BaseDispatch_Init(BaseDispatch *This, REFIID riid) -{ - ITypeLib *pTypeLib; - HRESULT hr; - - This->pTypeInfo = NULL; - hr = LoadRegTypeLib(&LIBID_QuartzTypeLib, 1, 0, LOCALE_SYSTEM_DEFAULT, &pTypeLib); - if (SUCCEEDED(hr)) - { - hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, riid, &This->pTypeInfo); - ITypeLib_Release(pTypeLib); - } - return hr; -} - -HRESULT WINAPI BaseDispatch_Destroy(BaseDispatch *This) -{ - if (This->pTypeInfo) - ITypeInfo_Release(This->pTypeInfo); - return S_OK; -} - -HRESULT WINAPI BaseDispatchImpl_GetIDsOfNames(BaseDispatch *This, REFIID riid, OLECHAR **rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid) -{ - if (This->pTypeInfo) - return ITypeInfo_GetIDsOfNames(This->pTypeInfo, rgszNames, cNames, rgdispid); - return E_NOTIMPL; -} - -HRESULT WINAPI BaseDispatchImpl_GetTypeInfo(BaseDispatch *This, REFIID riid, UINT itinfo, LCID lcid, ITypeInfo **pptinfo) -{ - if (This->pTypeInfo) - { - ITypeInfo_AddRef(This->pTypeInfo); - *pptinfo = This->pTypeInfo; - return S_OK; - } - return E_NOTIMPL; -} - -HRESULT WINAPI BaseDispatchImpl_GetTypeInfoCount(BaseDispatch *This, UINT *pctinfo) -{ - if (This->pTypeInfo) - *pctinfo = 1; - else - *pctinfo = 0; - return S_OK; -} diff --git a/dlls/strmbase/strmbase_private.h b/dlls/strmbase/strmbase_private.h index fc1e27d..769c8f2 100644 --- a/dlls/strmbase/strmbase_private.h +++ b/dlls/strmbase/strmbase_private.h @@ -70,12 +70,4 @@ HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_ HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface); HRESULT WINAPI RendererPosPassThru_EOS(IUnknown *iface);
-HRESULT WINAPI BaseDispatch_Init(BaseDispatch *disp, REFIID iid); -HRESULT WINAPI BaseDispatch_Destroy(BaseDispatch *disp); -HRESULT WINAPI BaseDispatchImpl_GetIDsOfNames(BaseDispatch *disp, REFIID iid, - WCHAR **names, UINT count, LCID lcid, DISPID *ids); -HRESULT WINAPI BaseDispatchImpl_GetTypeInfo(BaseDispatch *disp, REFIID iid, - UINT index, LCID lcid, ITypeInfo **typeinfo); -HRESULT WINAPI BaseDispatchImpl_GetTypeInfoCount(BaseDispatch *disp, UINT *count); - #endif /* __WINE_STRMBASE_PRIVATE_H */ diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 62dcf74..9f686dc 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -412,10 +412,6 @@ enum strmbase_type_id
HRESULT strmbase_get_typeinfo(enum strmbase_type_id tid, ITypeInfo **typeinfo);
-typedef struct{ - ITypeInfo *pTypeInfo; -} BaseDispatch; - #ifdef __IVideoWindow_FWD_DEFINED__ typedef struct tagBaseControlWindow {