cachedName property

Pointer<Utf16> get cachedName

Implementation

Pointer<Utf16> get cachedName {
  final retValuePtr = calloc<Pointer<Utf16>>();

  try {
    final hr = (ptr.ref.vtable + 55)
        .cast<
          Pointer<
            NativeFunction<
              Int32 Function(Pointer, Pointer<Pointer<Utf16>> retVal)
            >
          >
        >()
        .value
        .asFunction<int Function(Pointer, Pointer<Pointer<Utf16>> retVal)>()(
      ptr.ref.lpVtbl,
      retValuePtr,
    );

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

    final retValue = retValuePtr.value;
    return retValue;
  } finally {
    free(retValuePtr);
  }
}