Commit fad521f5 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Use the type info cache for IVideoWindow.

parent 384d3a45
...@@ -200,7 +200,6 @@ HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, const I ...@@ -200,7 +200,6 @@ HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, const I
hr = BaseWindow_Init(&pControlWindow->baseWindow, pFuncsTable); hr = BaseWindow_Init(&pControlWindow->baseWindow, pFuncsTable);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
BaseDispatch_Init(&pControlWindow->baseDispatch, &IID_IVideoWindow);
pControlWindow->IVideoWindow_iface.lpVtbl = lpVtbl; pControlWindow->IVideoWindow_iface.lpVtbl = lpVtbl;
pControlWindow->AutoShow = TRUE; pControlWindow->AutoShow = TRUE;
pControlWindow->hwndDrain = NULL; pControlWindow->hwndDrain = NULL;
...@@ -215,43 +214,54 @@ HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, const I ...@@ -215,43 +214,54 @@ HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, const I
HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow) HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow)
{ {
BaseWindowImpl_DoneWithWindow(&pControlWindow->baseWindow); BaseWindowImpl_DoneWithWindow(&pControlWindow->baseWindow);
return BaseDispatch_Destroy(&pControlWindow->baseDispatch); return S_OK;
} }
HRESULT WINAPI BaseControlWindowImpl_GetTypeInfoCount(IVideoWindow *iface, UINT *pctinfo) HRESULT WINAPI BaseControlWindowImpl_GetTypeInfoCount(IVideoWindow *iface, UINT *count)
{ {
BaseControlWindow* This = impl_from_IVideoWindow(iface); TRACE("iface %p, count %p.\n", iface, count);
*count = 1;
return BaseDispatchImpl_GetTypeInfoCount(&This->baseDispatch, pctinfo); return S_OK;
} }
HRESULT WINAPI BaseControlWindowImpl_GetTypeInfo(IVideoWindow *iface, UINT iTInfo, LCID lcid, ITypeInfo**ppTInfo) HRESULT WINAPI BaseControlWindowImpl_GetTypeInfo(IVideoWindow *iface, UINT index,
LCID lcid, ITypeInfo **typeinfo)
{ {
BaseControlWindow* This = impl_from_IVideoWindow(iface); TRACE("iface %p, index %u, lcid %#x, typeinfo %p.\n", iface, index, lcid, typeinfo);
return strmbase_get_typeinfo(IVideoWindow_tid, typeinfo);
return BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, &IID_NULL, iTInfo, lcid, ppTInfo);
} }
HRESULT WINAPI BaseControlWindowImpl_GetIDsOfNames(IVideoWindow *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) HRESULT WINAPI BaseControlWindowImpl_GetIDsOfNames(IVideoWindow *iface, REFIID iid,
{ LPOLESTR *names, UINT count, LCID lcid, DISPID *ids)
BaseControlWindow* This = impl_from_IVideoWindow(iface); {
ITypeInfo *typeinfo;
HRESULT hr;
return BaseDispatchImpl_GetIDsOfNames(&This->baseDispatch, riid, rgszNames, cNames, lcid, rgDispId); TRACE("iface %p, iid %s, names %p, count %u, lcid %#x, ids %p.\n",
iface, debugstr_guid(iid), names, count, lcid, ids);
if (SUCCEEDED(hr = strmbase_get_typeinfo(IVideoWindow_tid, &typeinfo)))
{
hr = ITypeInfo_GetIDsOfNames(typeinfo, names, count, ids);
ITypeInfo_Release(typeinfo);
}
return hr;
} }
HRESULT WINAPI BaseControlWindowImpl_Invoke(IVideoWindow *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr) HRESULT WINAPI BaseControlWindowImpl_Invoke(IVideoWindow *iface, DISPID id, REFIID iid, LCID lcid,
WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *error_arg)
{ {
BaseControlWindow* This = impl_from_IVideoWindow(iface); ITypeInfo *typeinfo;
ITypeInfo *pTypeInfo;
HRESULT hr; HRESULT hr;
hr = BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, riid, 1, lcid, &pTypeInfo); TRACE("iface %p, id %d, iid %s, lcid %#x, flags %#x, params %p, result %p, excepinfo %p, error_arg %p.\n",
if (SUCCEEDED(hr)) iface, id, debugstr_guid(iid), lcid, flags, params, result, excepinfo, error_arg);
if (SUCCEEDED(hr = strmbase_get_typeinfo(IVideoWindow_tid, &typeinfo)))
{ {
hr = ITypeInfo_Invoke(pTypeInfo, &This->IVideoWindow_iface, dispIdMember, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); hr = ITypeInfo_Invoke(typeinfo, iface, id, flags, params, result, excepinfo, error_arg);
ITypeInfo_Release(pTypeInfo); ITypeInfo_Release(typeinfo);
} }
return hr; return hr;
} }
......
...@@ -421,7 +421,6 @@ typedef struct tagBaseControlWindow ...@@ -421,7 +421,6 @@ typedef struct tagBaseControlWindow
{ {
BaseWindow baseWindow; BaseWindow baseWindow;
IVideoWindow IVideoWindow_iface; IVideoWindow IVideoWindow_iface;
BaseDispatch baseDispatch;
BOOL AutoShow; BOOL AutoShow;
HWND hwndDrain; HWND hwndDrain;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment