Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
ICreateDevEnum::CreateClassEnumerator
ICreateDevEnum::CreateClassEnumerator
The CreateClassEnumerator method creates an enumerator for a specified device category.
Syntax
HRESULT CreateClassEnumerator( REFCLSID clsidDeviceClass, IEnumMoniker **ppEnumMoniker, DWORD dwFlags );
Parameters
clsidDeviceClass
[in] Specifies the class identifier (CLSID) of the device category. See Filter Categories.
ppEnumMoniker
[out] Address of a variable that receives an IEnumMoniker interface pointer.
dwFlags
[in] Bitwise combination of zero or more flags. If zero, the method enumerates every filter in the category. If any flags are set, the enumeration includes only filters that match the specified flags. The following flags are defined:
Return Values
Returns one of the following HRESULT values.
Remarks
If the category does not exist or is empty, the return value is S_FALSE, and the ppEnumMoniker parameter receives the value NULL. Therefore, test for the return value S_OK instead of using the SUCCEEDED macro:
IEnumMoniker *pEnum = NULL;
hr = pSysDevEnum->CreateClassEnumerator(
CLSID_VideoCompressorCategory, &pEnum, 0);
if (hr == S_OK)
{
// Safe to dereference pEnum.
pEnum->Release();
}
The returned IEnumMoniker interface has an outstanding reference count. The caller must release the interface.
Requirements
Header: Declared in Strmif.h; include Dshow.h.
Library: Use Strmiids.lib.
See Also