IMSVidCtl::get__InputsAvailable Method

This topic applies to Windows XP or later.
The get__InputsAvailable method retrieves the input devices that are available in a specified category.

Syntax

HRESULT get__InputsAvailable(
  [in]   const GUID *CategoryGuid,
  [out]  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 Value

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.

Examples

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.
    }
}

Requirements

Header Declared in Dshow.h.
DLL Requires Quartz.dll.

See Also

IMSVidCtl Interface
IMSVidCtl::get_InputActive

Send comments about this topic to Microsoft

Build date: 12/4/2008