supportedDeviceClasses property

IVector<DeviceClass> get supportedDeviceClasses

Implementation

IVector<DeviceClass> get supportedDeviceClasses {
  final retValuePtr = calloc<COMObject>();

  final hr = ptr.ref.vtable
          .elementAt(6)
          .cast<
              Pointer<
                  NativeFunction<
                      HRESULT Function(Pointer, Pointer<COMObject>)>>>()
          .value
          .asFunction<int Function(Pointer, Pointer<COMObject>)>()(
      ptr.ref.lpVtbl, retValuePtr);

  if (FAILED(hr)) {
    free(retValuePtr);
    throw WindowsException(hr);
  }

  return IVector.fromRawPointer(retValuePtr,
      iterableIid: '{47d4be05-58f1-522e-81c6-975eb4131bb9}',
      enumCreator: DeviceClass.from,
      intType: Int32);
}