getRect method

Rect getRect()

Implementation

Rect getRect() {
  final retValuePtr = calloc<Rect>();

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

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

  return retValuePtr.ref;
}