DeviceGetByIndex Method (MFRendererClass)
device's type
index of a device
device's name
indicates whether the device busy
Gets a device by its index.
Syntax
Public Overridable Sub DeviceGetByIndex( _
   ByVal _eDevType As eMFDeviceType, _
   ByVal _nIndex As Integer, _
   ByRef _pbsName As String, _
   ByRef _pbBusy As Integer _
) 
public virtual void DeviceGetByIndex( 
   eMFDeviceType _eDevType,
   int _nIndex,
   out string _pbsName,
   out int _pbBusy
)
public procedure DeviceGetByIndex( 
    _eDevType: eMFDeviceType;
    _nIndex: Integer;
   Out  _pbsName: String;
   Out  _pbBusy: Integer
); virtual; 
public: virtual void DeviceGetByIndex( 
   eMFDeviceType _eDevType,
   int _nIndex,
   [PARAMFLAG::Out] BSTR* _pbsName,
   [PARAMFLAG::Out] int _pbBusy
) 

Parameters

_eDevType
device's type
_nIndex
index of a device
_pbsName
device's name
_pbBusy
indicates whether the device busy
Example

Here is an example of how to fill a combobox with all available video devices:

comboBoxV.Items.Clear();
//Feel video devices
int vCount;
try
{
    m_objLive = new MFLiveClass();
    m_objLive.DeviceGetCount(eMFDeviceType.eMFDT_Video, out vCount);
    if (vCount > 0)
    {
        for (int i = 0; i < vCount; i++)
        {
            string strName;
            int _pbBusy;
            m_objLive.DeviceGetByIndex(eMFDeviceType.eMFDT_Video, i, out strName, out _pbBusy);
            comboBoxV.Items.Add(strName);
        }
        comboBoxV.SelectedIndex = 0;
    }
}
catch { }
See Also

Reference

MFRendererClass Class
MFRendererClass Members