getUInt32 method

int getUInt32()

Implementation

int getUInt32() {
  final value = calloc<Uint32>();

  try {
    final hr = ptr.ref.vtable
            .elementAt(12)
            .cast<
                Pointer<
                    NativeFunction<
                        HRESULT Function(
                            VTablePointer lpVtbl, Pointer<Uint32> value)>>>()
            .value
            .asFunction<
                int Function(VTablePointer lpVtbl, Pointer<Uint32> value)>()(
        ptr.ref.lpVtbl, value);

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

    return value.value;
  } finally {
    free(value);
  }
}