Microsoft DirectX 8.0 |
Creates an enumerator for a list of filters and hardware devices in a specified filter category. The returned enumerator supports the IEnumMoniker interface.
The system device enumerator exposes this interface. It differentiates between individual hardware devices, even if the same filter supports them.
Applications can use this interface to find instances of filters that represent hardware devices. First create an instance of the system device enumerator, and then use it to create an enumerator for a particular category of device. For more information, see Enumerating Devices and Filters.
For more information on using enumerators, see the IEnumXXXX topic in the Platform SDK documentation.
Methods in Vtable Order
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. ICreateDevEnum methods Description CreateClassEnumerator Creates a class enumerator for the specified category.
Creates an enumerator for the specified type of object.
Syntax
HRESULT CreateClassEnumerator(
REFCLSID clsidDeviceClass,
IEnumMoniker **ppEnumMoniker,
DWORD dwFlags
);
Parameters
- clsidDeviceClass
- [in] REFCLSID value that specifies the type of device to enumerate. (See Filter Categories.)
- ppEnumMoniker
- [out] Address of a pointer to the Win32 IEnumMoniker (or derived) interface implemented by the new class enumerator.
- dwFlags
- [in] Reserved. Must be 0.
Return Value
Returns one of the following values.
NOERROR Success. S_OK Success. E_OUTOFMEMORY There is not enough memory available to create a class enumerator. S_FALSE The category specified by clsidDeviceClass does not exist.
Remarks
If no devices are found, the method does not return with a moniker of zero elements, instead, no moniker is returned.
The new class enumerator is a nonaggregate object that will run in the same process as the class that called this method.