Microsoft DirectX 9.0 |
This topic applies to Windows XP only.
The get__InputsAvailable method retrieves the input devices that are available in a specified category.
Syntax
HRESULT get__InputsAvailable(
const GUID* CategoryGuid,
IMSVidInputDevices** ppVal
);
Parameters
CategoryGuid
[in] Pointer to a GUID that specifies the category to enumerate. Supported categories include the following:
Value | Description |
KSCATEGORY_BDA_NETWORK_PROVIDER | BDA-compatible tuner devices. |
KSCATEGORY_TVTUNER | Non-BDA analog tuner devices. |
GUID_NULL | Miscellaneous devices (file source, DVD). |
ppVal
[out] Address of a variable that receives an IMSVidInputDevices interface pointer.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
This method returns a read-only collection of input devices. Use the returned IMSVidInputDevices pointer to enumerate the collection.
If the method succeeds, the IMSVidInputDevices interface has an outstanding reference count. The caller must release the interface.
Example Code
The following example enumerates the available BDA-compatible tuners and retrieves their friendly names.
CComPtr<IMSVidInputDevices> pInputs;
hr = pVidControl->get__InputsAvailable(&KSCATEGORY_BDA_NETWORK_PROVIDER, &pInputs);
if (SUCCEEDED(hr))
{
long lCount;
hr = pInputs->get_Count(&lCount);
for (long ix = 0; ix < lCount; ix++)
{
CComBSTR bstrName;
CComVariant var(ix);
CComPtr<IMSVidInputDevice> pInput;
hr = pInputs->get_Item(var, &pInput);
hr = pInput->get_Name(&bstrName);
// Display the name.
}
}
See Also