/// <summary> /// Initializes a new instance of the <see cref="DeviceEnumerator"/> class. /// </summary> /// <param name="deviceClass">The identifier of the associated devices.</param> /// <param name="flags">The flags used to defined the type of expected devices.</param> public DeviceEnumerator(Guid deviceClass, DiGetClassFlags flags) { this.deviceClass = deviceClass; this.deviceSet = SetupApiMethods.GetClassDevs(ref deviceClass, null, IntPtr.Zero, flags); this.interfaceData = new DeviceInterfaceData(); this.index = -1; }
/// <summary> /// Initializes a new instance of the <see cref="Device"/> class. /// </summary> /// <param name="deviceSet"></param> /// <param name="interfaceData"></param> private Device(SafeDeviceSetHandle deviceSet, DeviceInterfaceData interfaceData) { this.deviceSet = deviceSet; this.interfaceData = interfaceData; }