winrt::detach_abi 함수(C++/WinRT)

C++/WinRT 개체를 참조된 핸들 또는 참조된 인터페이스에서 분리하는 도우미 함수입니다. 인터페이스에서 분리는 참조 수를 줄이지 않고 수행되며 호출자에게 반환할 수 있습니다. 자세한 정보 및 코드 예제는 C++/WinRT와 ABI 간의 Interop을 참조하세요.

구문

template <typename T, typename =
std::enable_if_t<!std::is_base_of_v<winrt::Windows::Foundation::IUnknown, std::decay_t<T>>
&& !std::is_convertible_v<T, std::wstring_view>>>
auto detach_abi(T&& object);

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

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

constexpr void* detach_abi(std::nullptr_t) noexcept;

template <typename T>
void* detach_abi(winrt::com_ptr<T>& object) noexcept;

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

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

inline void* detach_abi(std::wstring_view const& value);

inline void* detach_abi(std::wchar_t const * const value);

template <typename T>
std::pair<uint32_t, void*> detach_abi(winrt::com_array<T>& object) noexcept;

template <typename T>
std::pair<uint32_t, void*> detach_abi(winrt::com_array<T>&& object) noexcept;

매개 변수

object 작동할 C++/WinRT 개체입니다.

반환 값

C++/WinRT 개체에서 참조하는 원시 인터페이스에 대한 포인터 또는 핸들입니다.

요구 사항

지원되는 최소 SDK: Windows SDK 버전 10.0.17134.0(Windows 10, 버전 1803)

네임스페이스: winrt

헤더: %WindowsSdkDir%IncludeWindowsTargetPlatformVersion<>\cppwinrt\winrt\base.h(기본적으로 포함)

참고 항목