Class DeviceEnum

Device enumerator.

Inheritance

DeviceEnum

Implements

Namespace: ic4
Assembly: ic4dotnet.dll
Syntax
public class DeviceEnum : HandleObject, IDisposable
Remarks

To query the devices attached to or the interfaces of the system, use the static properties Devices and Interfaces.

Device enumerator instances are only useful to register an event handler listening for changes to the detected device list by subscribing to the DeviceListChanged event.

Constructors

DeviceEnum()

Creates a new device enumerator.

Declaration

public DeviceEnum()

Exceptions

Type Condition
IC4Exception

Check ErrorCode and ToString() for details.

Properties

Devices

Enumerates the devices currently attached to the system.

Declaration

public static IReadOnlyList<DeviceInfo> Devices { get; }
Property Value
Type Description
IReadOnlyList<DeviceInfo>

A list of DeviceInfo objects representing all video capture devices.

Exceptions

Type Condition
IC4Exception

Check ErrorCode and ToString() for details.

Interfaces

Enumerates the interfaces present in the system.

Interfaces represent physical connections for cameras to the computer, e.g. network adapters or USB controllers.

Declaration

public static IReadOnlyList<Interface> Interfaces { get; }
Property Value
Type Description
IReadOnlyList<Interface>

A list of DeviceInfo objects representing the interfaces present in the system.

Exceptions

Type Condition
IC4Exception

Check ErrorCode and ToString() for details.

Events

DeviceListChanged

Occurs when a new device has been detected, or a device was detached.

Declaration

public event EventHandler DeviceListChanged
Event Type
Type Description
EventHandler

Implements