strmbase: Get rid of base IDispatch implementation.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ea0dfa7934
commit
0ce5ab71b0
|
@ -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
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* 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]);
|
ITypeInfo_AddRef(*ret = control_typeinfo[tid]);
|
||||||
return S_OK;
|
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;
|
|
||||||
}
|
|
||||||
|
|
|
@ -70,12 +70,4 @@ HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_
|
||||||
HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface);
|
HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface);
|
||||||
HRESULT WINAPI RendererPosPassThru_EOS(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 */
|
#endif /* __WINE_STRMBASE_PRIVATE_H */
|
||||||
|
|
|
@ -412,10 +412,6 @@ enum strmbase_type_id
|
||||||
|
|
||||||
HRESULT strmbase_get_typeinfo(enum strmbase_type_id tid, ITypeInfo **typeinfo);
|
HRESULT strmbase_get_typeinfo(enum strmbase_type_id tid, ITypeInfo **typeinfo);
|
||||||
|
|
||||||
typedef struct{
|
|
||||||
ITypeInfo *pTypeInfo;
|
|
||||||
} BaseDispatch;
|
|
||||||
|
|
||||||
#ifdef __IVideoWindow_FWD_DEFINED__
|
#ifdef __IVideoWindow_FWD_DEFINED__
|
||||||
typedef struct tagBaseControlWindow
|
typedef struct tagBaseControlWindow
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue