diff --git a/dlls/strmbase/dispatch.c b/dlls/strmbase/dispatch.c index 15214718899..25573fa1a26 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 fc1e27dd726..769c8f20864 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 62dcf741e1d..9f686dc4cff 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 {