pickSingleDeviceAsync method

Pointer<COMObject> pickSingleDeviceAsync(
  1. Rect selection
)

Implementation

Pointer<COMObject> pickSingleDeviceAsync(Rect selection) {
  final retValuePtr = calloc<COMObject>();

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

  if (FAILED(hr)) throw WindowsException(hr);

  return retValuePtr;
}