@node-ctypes/winrt - v0.1.0
    Preparing search index...

    Function readReference

    • Unwrap a nullable WinRT IReference<T> (0n -> null), releasing the IReference COM pointer after reading its value.

      Type Parameters

      • T

      Parameters

      • refAddr: bigint
      • readValue: (
            ref: InterfacePointer<
                ComInterfaceDef<
                    ComInterfaceDef<
                        ComInterfaceDef<
                            undefined,
                            readonly [
                                MethodSpec<
                                    "QueryInterface",
                                    RawFunction<
                                        SimpleCDataConstructor<"int32"> & {},
                                        readonly [
                                            PointerTypeDef<typeof GUID>,
                                            PointerTypeDef<SimpleCDataConstructor<(...)>>,
                                        ],
                                    >,
                                    "method",
                                    "QueryInterface",
                                >,
                                MethodSpec<
                                    "AddRef",
                                    RawFunction<SimpleCDataConstructor<"uint32">, readonly []>,
                                    "method",
                                    "AddRef",
                                >,
                                MethodSpec<
                                    "Release",
                                    RawFunction<SimpleCDataConstructor<"uint32">, readonly []>,
                                    "method",
                                    "Release",
                                >,
                            ],
                            readonly [],
                        >,
                        readonly [
                            MethodSpec<
                                "GetIids",
                                RawFunction<
                                    SimpleCDataConstructor<"int32"> & {},
                                    readonly [
                                        SimpleCDataConstructor<"pointer">,
                                        SimpleCDataConstructor<"pointer">,
                                    ],
                                >,
                                "method",
                                "GetIids",
                            >,
                            MethodSpec<
                                "GetRuntimeClassName",
                                RawFunction<
                                    SimpleCDataConstructor<"int32"> & {},
                                    readonly [SimpleCDataConstructor<"pointer">],
                                >,
                                "method",
                                "GetRuntimeClassName",
                            >,
                            MethodSpec<
                                "GetTrustLevel",
                                RawFunction<
                                    SimpleCDataConstructor<"int32"> & {},
                                    readonly [SimpleCDataConstructor<"pointer">],
                                >,
                                "method",
                                "GetTrustLevel",
                            >,
                        ],
                        readonly [],
                    >,
                    readonly [
                        MethodSpec<
                            "get_Value",
                            RawFunction<
                                SimpleCDataConstructor<"int32"> & {},
                                readonly [SimpleCDataConstructor<"pointer">],
                            >,
                            "method",
                            "get_Value",
                        >,
                    ],
                    readonly [],
                >,
            >,
        ) => T

      Returns T | null