In my app i've problems with losing GDI objects. I could nearow it down to
the code below. In each loop i lose 3 GDI objects. Also when i comment out
the SetRenderingMode call i lose GDI objects.
I have not found any known issuses with the VideoMixingRenderer9, so i guess
i do something wrong. Can anyone point me in the right direction?
Thanks in advatage.
Regards
Piet
void LoseGDIObjects()
{
CComQIPtr<IBaseFilter,&IID_IBaseFilter> pVideoMixingRenderer;
HRESULT hr = pVideoMixingRenderer.CoCreateInstance
(CLSID_VideoMixingRenderer9);
if (hr == S_OK)
{
CComQIPtr<IVMRFilterConfig9,&IID_IVMRFilterConfig9> pConfig =
pVideoMixingRenderer;
if (pConfig)
{
hr = pConfig->SetRenderingMode(VMR9Mode_Windowless);
}
}
}
int main()
{
HRESULT hr = E_UNEXPECTED;
for (int i = 0; i < 10000; i++)
{
LoseGDIObjects();
}
return 0;
}