共用方式為


winrt::get_abi 函式 (C++/WinRT)

協助程式函式,可擷取 C++/WinRT 物件基礎 IUnknown 介面的指標。 如需詳細資訊和程式碼範例,請參閱 C++/WinRT 與 ABI 之間的 Interop

語法

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;

參數

object 要擷取其 IUnknown 介面指標的 C++/WinRT 物件。

傳回值

C++/WinRT 物件的 IUnknown 介面指標。

規格需求

最低支援的 SDK:Windows SDK 10.0.17134.0 版 (Windows 10版本 1803)

命名空間: winrt

標頭: %WindowsSdkDir%IncludeWindowsTargetPlatformVersion <> \cppwinrt\winrt\base. (h 預設包含)

另請參閱