Compartir a través de


Using the DMO Wrapper Filter (Windows CE 5.0)

Send Feedback

To create an instance of the DMO Wrapper filter, query the DMO Wrapper filter for the IDMOWrapperFilter interface. Then, call the IDMOWrapperFilter::Init method, which takes the CLSID of the DMO and the GUID of the DMO's category.

You can use the DMOEnum function to enumerate DMOs registered on the user's system. DMOs are registered using a different set of category GUIDs from the ones used for DirectShow filters. For a list of DMO categories, see DMO GUIDs.

The following code example shows how to use the IDMOWrapperFilter interface.

// IMediaObject
 
// Create the DMO Wrapper filter.
 IBaseFilter *pFilter;
 HRESULT hr = CoCreateInstance(CLSID_DMOWrapperFilter, NULL,
    CLSCTX_INPROC, IID_IBaseFilter, (void **)&pFilter);
 
if (SUCCEEDED(hr)) 
{
    IDMOWrapperFilter *pWrap;
    hr = pFilter->QueryInterface(IID_IDMOWrapperFilter, (void **)&pWrap);
 
    if (SUCCEEDED(hr)) {     // Initialize the filter.
        hr = pWrap->Init(CLSID_MyDMO, CLSID_MyDMOCategory);
        pWrap->Release();
    }

    if (SUCCEEDED(hr)) {     // Add the filter to the graph.
        hr = pGraph->AddFilter(pFilter, L"My DMO");
    }
    pFilter->Release();
}

See Also

Using DMOs in a DirectShow Application

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.