2

My DirectShow application is working on Win7. When I switched it to Win2008 R2 server it failed to initialize NullRender filter with an error code -2147221164 (which is 0x80040154 REGDB_E_CLASSNOTREG "Class not registered").

HRESULT CDirectShowGraph::AddFilterToGraph(CComPtr<IBaseFilter>& spFilter, GUID filterGuid, LPCWSTR filterName)
    {   
        HRESULT hr = S_OK;   

    //Create the filter
    hr = spFilter.CoCreateInstance(filterGuid);

    if (FAILED(hr))
    {       
        CDirectShowGraph::Msg(TEXT("[CDirectShowGraph::AddFilterToGraph] Failed to initialize filter \"%s\" hr=0x%x"), filterName, hr);
        return hr;
    }

    //Add the filter to the graph
    if (FAILED(hr = m_spGraph->AddFilter(spFilter, filterName)))
    {
        CDirectShowGraph::Msg(TEXT("[CDirectShowGraph::AddFilterToGraph] Adding filter failed \"%s\" hr=0x%x"), filterName, hr);
        return hr;
    }
    return hr;
}

...

m_DirectShowGraph.AddFilterToGraph( m_spNullRenderer, CLSID_NullRenderer, L"NullRender")

I have also tried reinstalling Windows SDK.

Even GraphEdit crashes, when I expand the DirectShow Filters node. I tried DirectShowFilterManager (http://www.softella.com/dsfm/index.en.htm) and it also does not show NullRender in the list. However, on Win7 NullRender is appearing.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
Jawad Akhtar
  • 172
  • 9

1 Answers1

3

Microsoft took Null Renderer out of Win Server 2008 (along with other filters like Sample Grabber - all hosted by qedit.dll). You need to look for replacement, which, for example, can be a similar filter/sample in one of old Platform SDKs.

See also:

Community
  • 1
  • 1
Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • I found the following thread in this regard. https://groups.google.com/forum/#!topic/microsoft.public.win32.programmer.directx.video/L1COWUTSER4 – Jawad Akhtar Apr 06 '15 at 06:11
  • May be we can load the DLL (qedit.dll) manually and use the filter from it. Do you know any similar filter that is available in Win2000 ? – Jawad Akhtar Apr 06 '15 at 06:11
  • 2
    Taking DLL from another version of Windows is violating Windows EULA. You can build your own Null Renderer from older SDK samples. Or, a similar filter is available with this DLL (needs COM registration): [`DirectShowTools-Win32.dll`](http://www.alax.info/svn/public/trunk/Toolbox/DirectShowTools-Win32.dll), name "Alax.Info Live Null Renderer Filter", CLSID `{22A38DDD-5FCE-4275-B95D-B8ABE2AC25D6}`. – Roman R. Apr 06 '15 at 06:29