numeralSystem property

String numeralSystem

Implementation

String get numeralSystem {
  final retValuePtr = calloc<HSTRING>();

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

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

    final retValue = retValuePtr.toDartString();
    return retValue;
  } finally {
    WindowsDeleteString(retValuePtr.value);
    free(retValuePtr);
  }
}
void numeralSystem=(String value)

Implementation

set numeralSystem(String value) {
  final hstr = convertToHString(value);

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

    if (FAILED(hr)) throw WindowsException(hr);
  } finally {
    WindowsDeleteString(hstr);
  }
}