completed property

Pointer<COMObject> get completed

Implementation

Pointer<COMObject> get completed {
  final handler = calloc<COMObject>();

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

  if (FAILED(hr)) {
    free(handler);
    throwWindowsException(hr);
  }

  return handler;
}
set completed (Pointer<COMObject> handler)

Implementation

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

  if (FAILED(hr)) throwWindowsException(hr);
}