winrt::get_abi 函数 (C++/WinRT)
一个帮助程序函数,用于检索指向 C++/WinRT 对象的基础 IUnknown 接口的指针。 有关详细信息和代码示例,请参阅 C++/WinRT 与 ABI 之间的互操作。
语法
template <typename T, typename = std::enable_if_t<!std::is_base_of_v<winrt::Windows::Foundation::IUnknown, T>>>
auto get_abi(T const& object) noexcept;
inline void* get_abi(winrt::Windows::Foundation::IUnknown const& object) noexcept;
inline void* get_abi(winrt::hstring const& object) noexcept;
template <typename T>
static auto get_abi(winrt::array_view<T> object) noexcept;
template <typename T>
auto get_abi(winrt::param::async_iterable<T> const& object) noexcept;
template <typename K, typename V>
auto get_abi(winrt::param::async_map_view<K, V> const& object) noexcept;
template <typename T>
auto get_abi(winrt::param::async_vector_view<T> const& object) noexcept;
template <typename T>
auto get_abi(winrt::com_ptr<T> const& object) noexcept;
template <typename T>
auto get_abi(winrt::param::iterable<T> const& object) noexcept;
template <typename K, typename V>
auto get_abi(winrt::param::map<K, V> const& object) noexcept;
template <typename K, typename V>
auto get_abi(winrt::param::map_view<K, V> const& object) noexcept;
template <typename T>
auto get_abi(winrt::param::vector<T> const& object) noexcept;
template <typename T>
auto get_abi(winrt::param::vector_view<T> const& object) noexcept;
parameters
object
要检索的 IUnknown 接口指针的 C++/WinRT 对象。
返回值
指向 C++/WinRT 对象的 IUnknown 接口的指针。
要求
支持的最低 SDK:Windows SDK 版本 10.0.17134.0 (Windows 10版本 1803)
命名空间: winrt
标头: %WindowsSdkDir%IncludeWindowsTargetPlatformVersion<>\cppwinrt\winrt\base.h (默认包含)