Upravit

Sdílet prostřednictvím


winrt::put_abi function (C++/WinRT)

A helper function that retrieves the address of a C++/WinRT object's underlying IUnknown interface pointer so that it can be set to another value.

Syntax

template <typename T, typename = std::enable_if_t<!std::is_base_of_v<winrt::Windows::Foundation::IUnknown, T>>>
auto put_abi(T& object) noexcept;

inline void** put_abi(winrt::Windows::Foundation::IUnknown& object) noexcept;

inline void** put_abi(winrt::hstring& object) noexcept;

template<typename T>
auto put_abi(winrt::com_array<T>& object) noexcept;

template <typename T>
auto put_abi(winrt::com_ptr<T>& object) noexcept;

template <typename T>
auto put_abi(winrt::weak_ref<T>& object) noexcept;

Parameters

object The C++/WinRT object the address of whose IUnknown interface pointer to retrieve.

Return value

The address of the IUnknown interface pointer of the C++/WinRT object.

Requirements

Minimum supported SDK: Windows SDK version 10.0.17134.0 (Windows 10, version 1803)

Namespace: winrt

Header: %WindowsSdkDir%Include<WindowsTargetPlatformVersion>\cppwinrt\winrt\base.h (included by default)

See also