MFORMATSLib Namespace > MFLiveClass Class : DeviceGetCount Method |
Public Overridable Sub DeviceGetCount( _ ByVal _eDevType As eMFDeviceType, _ ByRef _pnCount As Integer _ )
public virtual void DeviceGetCount( eMFDeviceType _eDevType, out int _pnCount )
public procedure DeviceGetCount( _eDevType: eMFDeviceType; Out _pnCount: Integer ); virtual;
public: virtual void DeviceGetCount( eMFDeviceType _eDevType, [PARAMFLAG::Out] int _pnCount )
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 { }