pickSingleDeviceAsyncWithPlacement method

Pointer<COMObject> pickSingleDeviceAsyncWithPlacement(
  1. Rect selection,
  2. Placement placement
)

Implementation

Pointer<COMObject> pickSingleDeviceAsyncWithPlacement(
    Rect selection, Placement placement) {
  final retValuePtr = calloc<COMObject>();

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

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

  return retValuePtr;
}