// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Security_EnterpriseData_H #define WINRT_Windows_Security_EnterpriseData_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Networking.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.Security.EnterpriseData.2.h" namespace winrt::impl { template auto consume_Windows_Security_EnterpriseData_IBufferProtectUnprotectResult::Buffer() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Buffer(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Buffer(&value)); } return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IBufferProtectUnprotectResult::ProtectionInfo() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ProtectionInfo(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtectionInfo(&value)); } return winrt::Windows::Security::EnterpriseData::DataProtectionInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IDataProtectionInfo::Status() const { winrt::Windows::Security::EnterpriseData::DataProtectionStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_EnterpriseData_IDataProtectionInfo::Identity() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Identity(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Identity(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IDataProtectionManagerStatics::ProtectAsync(winrt::Windows::Storage::Streams::IBuffer const& data, param::hstring const& identity) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ProtectAsync(*(void**)(&data), *(void**)(&identity), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ProtectAsync(*(void**)(&data), *(void**)(&identity), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IDataProtectionManagerStatics::UnprotectAsync(winrt::Windows::Storage::Streams::IBuffer const& data) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->UnprotectAsync(*(void**)(&data), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UnprotectAsync(*(void**)(&data), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IDataProtectionManagerStatics::ProtectStreamAsync(winrt::Windows::Storage::Streams::IInputStream const& unprotectedStream, param::hstring const& identity, winrt::Windows::Storage::Streams::IOutputStream const& protectedStream) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ProtectStreamAsync(*(void**)(&unprotectedStream), *(void**)(&identity), *(void**)(&protectedStream), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ProtectStreamAsync(*(void**)(&unprotectedStream), *(void**)(&identity), *(void**)(&protectedStream), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IDataProtectionManagerStatics::UnprotectStreamAsync(winrt::Windows::Storage::Streams::IInputStream const& protectedStream, winrt::Windows::Storage::Streams::IOutputStream const& unprotectedStream) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->UnprotectStreamAsync(*(void**)(&protectedStream), *(void**)(&unprotectedStream), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UnprotectStreamAsync(*(void**)(&protectedStream), *(void**)(&unprotectedStream), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IDataProtectionManagerStatics::GetProtectionInfoAsync(winrt::Windows::Storage::Streams::IBuffer const& protectedData) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetProtectionInfoAsync(*(void**)(&protectedData), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetProtectionInfoAsync(*(void**)(&protectedData), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IDataProtectionManagerStatics::GetStreamProtectionInfoAsync(winrt::Windows::Storage::Streams::IInputStream const& protectedStream) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetStreamProtectionInfoAsync(*(void**)(&protectedStream), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetStreamProtectionInfoAsync(*(void**)(&protectedStream), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionInfo::Status() const { winrt::Windows::Security::EnterpriseData::FileProtectionStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionInfo::IsRoamable() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsRoamable(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsRoamable(&value)); } return value; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionInfo::Identity() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Identity(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Identity(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionInfo2::IsProtectWhileOpenSupported() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsProtectWhileOpenSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsProtectWhileOpenSupported(&value)); } return value; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionManagerStatics::ProtectAsync(winrt::Windows::Storage::IStorageItem const& target, param::hstring const& identity) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ProtectAsync(*(void**)(&target), *(void**)(&identity), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ProtectAsync(*(void**)(&target), *(void**)(&identity), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionManagerStatics::CopyProtectionAsync(winrt::Windows::Storage::IStorageItem const& source, winrt::Windows::Storage::IStorageItem const& target) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CopyProtectionAsync(*(void**)(&source), *(void**)(&target), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CopyProtectionAsync(*(void**)(&source), *(void**)(&target), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionManagerStatics::GetProtectionInfoAsync(winrt::Windows::Storage::IStorageItem const& source) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetProtectionInfoAsync(*(void**)(&source), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetProtectionInfoAsync(*(void**)(&source), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionManagerStatics::SaveFileAsContainerAsync(winrt::Windows::Storage::IStorageFile const& protectedFile) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SaveFileAsContainerAsync(*(void**)(&protectedFile), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SaveFileAsContainerAsync(*(void**)(&protectedFile), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionManagerStatics::LoadFileFromContainerAsync(winrt::Windows::Storage::IStorageFile const& containerFile) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LoadFileFromContainerAsync(*(void**)(&containerFile), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LoadFileFromContainerAsync(*(void**)(&containerFile), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionManagerStatics::LoadFileFromContainerAsync(winrt::Windows::Storage::IStorageFile const& containerFile, winrt::Windows::Storage::IStorageItem const& target) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LoadFileFromContainerWithTargetAsync(*(void**)(&containerFile), *(void**)(&target), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LoadFileFromContainerWithTargetAsync(*(void**)(&containerFile), *(void**)(&target), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionManagerStatics::CreateProtectedAndOpenAsync(winrt::Windows::Storage::IStorageFolder const& parentFolder, param::hstring const& desiredName, param::hstring const& identity, winrt::Windows::Storage::CreationCollisionOption const& collisionOption) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateProtectedAndOpenAsync(*(void**)(&parentFolder), *(void**)(&desiredName), *(void**)(&identity), static_cast(collisionOption), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateProtectedAndOpenAsync(*(void**)(&parentFolder), *(void**)(&desiredName), *(void**)(&identity), static_cast(collisionOption), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionManagerStatics2::IsContainerAsync(winrt::Windows::Storage::IStorageFile const& file) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IsContainerAsync(*(void**)(&file), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsContainerAsync(*(void**)(&file), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionManagerStatics2::LoadFileFromContainerAsync(winrt::Windows::Storage::IStorageFile const& containerFile, winrt::Windows::Storage::IStorageItem const& target, winrt::Windows::Storage::NameCollisionOption const& collisionOption) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LoadFileFromContainerWithTargetAndNameCollisionOptionAsync(*(void**)(&containerFile), *(void**)(&target), static_cast(collisionOption), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LoadFileFromContainerWithTargetAndNameCollisionOptionAsync(*(void**)(&containerFile), *(void**)(&target), static_cast(collisionOption), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionManagerStatics2::SaveFileAsContainerAsync(winrt::Windows::Storage::IStorageFile const& protectedFile, param::async_iterable const& sharedWithIdentities) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SaveFileAsContainerWithSharingAsync(*(void**)(&protectedFile), *(void**)(&sharedWithIdentities), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SaveFileAsContainerWithSharingAsync(*(void**)(&protectedFile), *(void**)(&sharedWithIdentities), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionManagerStatics3::UnprotectAsync(winrt::Windows::Storage::IStorageItem const& target) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->UnprotectAsync(*(void**)(&target), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UnprotectAsync(*(void**)(&target), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileProtectionManagerStatics3::UnprotectAsync(winrt::Windows::Storage::IStorageItem const& target, winrt::Windows::Security::EnterpriseData::FileUnprotectOptions const& options) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->UnprotectWithOptionsAsync(*(void**)(&target), *(void**)(&options), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UnprotectWithOptionsAsync(*(void**)(&target), *(void**)(&options), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileRevocationManagerStatics::ProtectAsync(winrt::Windows::Storage::IStorageItem const& storageItem, param::hstring const& enterpriseIdentity) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ProtectAsync(*(void**)(&storageItem), *(void**)(&enterpriseIdentity), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ProtectAsync(*(void**)(&storageItem), *(void**)(&enterpriseIdentity), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileRevocationManagerStatics::CopyProtectionAsync(winrt::Windows::Storage::IStorageItem const& sourceStorageItem, winrt::Windows::Storage::IStorageItem const& targetStorageItem) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CopyProtectionAsync(*(void**)(&sourceStorageItem), *(void**)(&targetStorageItem), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CopyProtectionAsync(*(void**)(&sourceStorageItem), *(void**)(&targetStorageItem), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileRevocationManagerStatics::Revoke(param::hstring const& enterpriseIdentity) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Revoke(*(void**)(&enterpriseIdentity))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Revoke(*(void**)(&enterpriseIdentity))); } } template auto consume_Windows_Security_EnterpriseData_IFileRevocationManagerStatics::GetStatusAsync(winrt::Windows::Storage::IStorageItem const& storageItem) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetStatusAsync(*(void**)(&storageItem), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetStatusAsync(*(void**)(&storageItem), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IFileUnprotectOptions::Audit(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Audit(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Audit(value)); } } template auto consume_Windows_Security_EnterpriseData_IFileUnprotectOptions::Audit() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Audit(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Audit(&value)); } return value; } template auto consume_Windows_Security_EnterpriseData_IFileUnprotectOptionsFactory::Create(bool audit) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(audit, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(audit, &result)); } return winrt::Windows::Security::EnterpriseData::FileUnprotectOptions{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectedAccessResumedEventArgs::Identities() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Identities(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Identities(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectedAccessSuspendingEventArgs::Identities() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Identities(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Identities(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectedAccessSuspendingEventArgs::Deadline() const { winrt::Windows::Foundation::DateTime value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Deadline(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Deadline(put_abi(value))); } return value; } template auto consume_Windows_Security_EnterpriseData_IProtectedAccessSuspendingEventArgs::GetDeferral() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&result)); } return winrt::Windows::Foundation::Deferral{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectedContainerExportResult::Status() const { winrt::Windows::Security::EnterpriseData::ProtectedImportExportStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_EnterpriseData_IProtectedContainerExportResult::File() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_File(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_File(&value)); } return winrt::Windows::Storage::StorageFile{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectedContainerImportResult::Status() const { winrt::Windows::Security::EnterpriseData::ProtectedImportExportStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_EnterpriseData_IProtectedContainerImportResult::File() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_File(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_File(&value)); } return winrt::Windows::Storage::StorageFile{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectedContentRevokedEventArgs::Identities() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Identities(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Identities(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectedFileCreateResult::File() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_File(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_File(&value)); } return winrt::Windows::Storage::StorageFile{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectedFileCreateResult::Stream() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Stream(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Stream(&value)); } return winrt::Windows::Storage::Streams::IRandomAccessStream{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectedFileCreateResult::ProtectionInfo() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ProtectionInfo(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtectionInfo(&value)); } return winrt::Windows::Security::EnterpriseData::FileProtectionInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyAuditInfo::Action(winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditAction const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Action(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Action(static_cast(value))); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyAuditInfo::Action() const { winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditAction value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Action(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Action(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyAuditInfo::DataDescription(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_DataDescription(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DataDescription(*(void**)(&value))); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyAuditInfo::DataDescription() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DataDescription(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DataDescription(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyAuditInfo::SourceDescription(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_SourceDescription(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SourceDescription(*(void**)(&value))); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyAuditInfo::SourceDescription() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SourceDescription(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SourceDescription(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyAuditInfo::TargetDescription(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_TargetDescription(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_TargetDescription(*(void**)(&value))); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyAuditInfo::TargetDescription() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TargetDescription(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TargetDescription(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyAuditInfoFactory::Create(winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditAction const& action, param::hstring const& dataDescription, param::hstring const& sourceDescription, param::hstring const& targetDescription) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(static_cast(action), *(void**)(&dataDescription), *(void**)(&sourceDescription), *(void**)(&targetDescription), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(static_cast(action), *(void**)(&dataDescription), *(void**)(&sourceDescription), *(void**)(&targetDescription), &result)); } return winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyAuditInfoFactory::CreateWithActionAndDataDescription(winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditAction const& action, param::hstring const& dataDescription) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateWithActionAndDataDescription(static_cast(action), *(void**)(&dataDescription), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithActionAndDataDescription(static_cast(action), *(void**)(&dataDescription), &result)); } return winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManager::Identity(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Identity(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Identity(*(void**)(&value))); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManager::Identity() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Identity(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Identity(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManager2::ShowEnterpriseIndicator(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ShowEnterpriseIndicator(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ShowEnterpriseIndicator(value)); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManager2::ShowEnterpriseIndicator() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ShowEnterpriseIndicator(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ShowEnterpriseIndicator(&value)); } return value; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::IsIdentityManaged(param::hstring const& identity) const { bool result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IsIdentityManaged(*(void**)(&identity), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsIdentityManaged(*(void**)(&identity), &result)); } return result; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::TryApplyProcessUIPolicy(param::hstring const& identity) const { bool result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryApplyProcessUIPolicy(*(void**)(&identity), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryApplyProcessUIPolicy(*(void**)(&identity), &result)); } return result; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::ClearProcessUIPolicy() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ClearProcessUIPolicy()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ClearProcessUIPolicy()); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::CreateCurrentThreadNetworkContext(param::hstring const& identity) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateCurrentThreadNetworkContext(*(void**)(&identity), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateCurrentThreadNetworkContext(*(void**)(&identity), &result)); } return winrt::Windows::Security::EnterpriseData::ThreadNetworkContext{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::GetPrimaryManagedIdentityForNetworkEndpointAsync(winrt::Windows::Networking::HostName const& endpointHost) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetPrimaryManagedIdentityForNetworkEndpointAsync(*(void**)(&endpointHost), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPrimaryManagedIdentityForNetworkEndpointAsync(*(void**)(&endpointHost), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::RevokeContent(param::hstring const& identity) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RevokeContent(*(void**)(&identity))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RevokeContent(*(void**)(&identity))); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::GetForCurrentView() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetForCurrentView(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetForCurrentView(&result)); } return winrt::Windows::Security::EnterpriseData::ProtectionPolicyManager{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::ProtectedAccessSuspending(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ProtectedAccessSuspending(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ProtectedAccessSuspending(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::ProtectedAccessSuspending(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, ProtectedAccessSuspending(handler)); } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::ProtectedAccessSuspending(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ProtectedAccessSuspending(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ProtectedAccessSuspending(impl::bind_in(token)); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::ProtectedAccessResumed(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ProtectedAccessResumed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ProtectedAccessResumed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::ProtectedAccessResumed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, ProtectedAccessResumed(handler)); } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::ProtectedAccessResumed(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ProtectedAccessResumed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ProtectedAccessResumed(impl::bind_in(token)); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::ProtectedContentRevoked(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ProtectedContentRevoked(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ProtectedContentRevoked(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::ProtectedContentRevoked(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, ProtectedContentRevoked(handler)); } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::ProtectedContentRevoked(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ProtectedContentRevoked(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ProtectedContentRevoked(impl::bind_in(token)); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::CheckAccess(param::hstring const& sourceIdentity, param::hstring const& targetIdentity) const { winrt::Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CheckAccess(*(void**)(&sourceIdentity), *(void**)(&targetIdentity), reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CheckAccess(*(void**)(&sourceIdentity), *(void**)(&targetIdentity), reinterpret_cast(&result))); } return result; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics::RequestAccessAsync(param::hstring const& sourceIdentity, param::hstring const& targetIdentity) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessAsync(*(void**)(&sourceIdentity), *(void**)(&targetIdentity), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessAsync(*(void**)(&sourceIdentity), *(void**)(&targetIdentity), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics2::HasContentBeenRevokedSince(param::hstring const& identity, winrt::Windows::Foundation::DateTime const& since) const { bool result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->HasContentBeenRevokedSince(*(void**)(&identity), impl::bind_in(since), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->HasContentBeenRevokedSince(*(void**)(&identity), impl::bind_in(since), &result)); } return result; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics2::CheckAccessForApp(param::hstring const& sourceIdentity, param::hstring const& appPackageFamilyName) const { winrt::Windows::Security::EnterpriseData::ProtectionPolicyEvaluationResult result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CheckAccessForApp(*(void**)(&sourceIdentity), *(void**)(&appPackageFamilyName), reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CheckAccessForApp(*(void**)(&sourceIdentity), *(void**)(&appPackageFamilyName), reinterpret_cast(&result))); } return result; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics2::RequestAccessForAppAsync(param::hstring const& sourceIdentity, param::hstring const& appPackageFamilyName) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessForAppAsync(*(void**)(&sourceIdentity), *(void**)(&appPackageFamilyName), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessForAppAsync(*(void**)(&sourceIdentity), *(void**)(&appPackageFamilyName), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics2::GetEnforcementLevel(param::hstring const& identity) const { winrt::Windows::Security::EnterpriseData::EnforcementLevel value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetEnforcementLevel(*(void**)(&identity), reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetEnforcementLevel(*(void**)(&identity), reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics2::IsUserDecryptionAllowed(param::hstring const& identity) const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IsUserDecryptionAllowed(*(void**)(&identity), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsUserDecryptionAllowed(*(void**)(&identity), &value)); } return value; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics2::IsProtectionUnderLockRequired(param::hstring const& identity) const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IsProtectionUnderLockRequired(*(void**)(&identity), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsProtectionUnderLockRequired(*(void**)(&identity), &value)); } return value; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics2::PolicyChanged(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PolicyChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PolicyChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics2::PolicyChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, PolicyChanged(handler)); } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics2::PolicyChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PolicyChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PolicyChanged(impl::bind_in(token)); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics2::IsProtectionEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsProtectionEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsProtectionEnabled(&value)); } return value; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics3::RequestAccessAsync(param::hstring const& sourceIdentity, param::hstring const& targetIdentity, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessWithAuditingInfoAsync(*(void**)(&sourceIdentity), *(void**)(&targetIdentity), *(void**)(&auditInfo), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessWithAuditingInfoAsync(*(void**)(&sourceIdentity), *(void**)(&targetIdentity), *(void**)(&auditInfo), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics3::RequestAccessAsync(param::hstring const& sourceIdentity, param::hstring const& targetIdentity, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo, param::hstring const& messageFromApp) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessWithMessageAsync(*(void**)(&sourceIdentity), *(void**)(&targetIdentity), *(void**)(&auditInfo), *(void**)(&messageFromApp), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessWithMessageAsync(*(void**)(&sourceIdentity), *(void**)(&targetIdentity), *(void**)(&auditInfo), *(void**)(&messageFromApp), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics3::RequestAccessForAppAsync(param::hstring const& sourceIdentity, param::hstring const& appPackageFamilyName, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessForAppWithAuditingInfoAsync(*(void**)(&sourceIdentity), *(void**)(&appPackageFamilyName), *(void**)(&auditInfo), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessForAppWithAuditingInfoAsync(*(void**)(&sourceIdentity), *(void**)(&appPackageFamilyName), *(void**)(&auditInfo), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics3::RequestAccessForAppAsync(param::hstring const& sourceIdentity, param::hstring const& appPackageFamilyName, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo, param::hstring const& messageFromApp) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessForAppWithMessageAsync(*(void**)(&sourceIdentity), *(void**)(&appPackageFamilyName), *(void**)(&auditInfo), *(void**)(&messageFromApp), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessForAppWithMessageAsync(*(void**)(&sourceIdentity), *(void**)(&appPackageFamilyName), *(void**)(&auditInfo), *(void**)(&messageFromApp), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics3::LogAuditEvent(param::hstring const& sourceIdentity, param::hstring const& targetIdentity, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LogAuditEvent(*(void**)(&sourceIdentity), *(void**)(&targetIdentity), *(void**)(&auditInfo))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LogAuditEvent(*(void**)(&sourceIdentity), *(void**)(&targetIdentity), *(void**)(&auditInfo))); } } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics4::IsRoamableProtectionEnabled(param::hstring const& identity) const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IsRoamableProtectionEnabled(*(void**)(&identity), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsRoamableProtectionEnabled(*(void**)(&identity), &value)); } return value; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics4::RequestAccessAsync(param::hstring const& sourceIdentity, param::hstring const& targetIdentity, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo, param::hstring const& messageFromApp, winrt::Windows::Security::EnterpriseData::ProtectionPolicyRequestAccessBehavior const& behavior) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessWithBehaviorAsync(*(void**)(&sourceIdentity), *(void**)(&targetIdentity), *(void**)(&auditInfo), *(void**)(&messageFromApp), static_cast(behavior), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessWithBehaviorAsync(*(void**)(&sourceIdentity), *(void**)(&targetIdentity), *(void**)(&auditInfo), *(void**)(&messageFromApp), static_cast(behavior), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics4::RequestAccessForAppAsync(param::hstring const& sourceIdentity, param::hstring const& appPackageFamilyName, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo, param::hstring const& messageFromApp, winrt::Windows::Security::EnterpriseData::ProtectionPolicyRequestAccessBehavior const& behavior) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessForAppWithBehaviorAsync(*(void**)(&sourceIdentity), *(void**)(&appPackageFamilyName), *(void**)(&auditInfo), *(void**)(&messageFromApp), static_cast(behavior), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessForAppWithBehaviorAsync(*(void**)(&sourceIdentity), *(void**)(&appPackageFamilyName), *(void**)(&auditInfo), *(void**)(&messageFromApp), static_cast(behavior), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics4::RequestAccessToFilesForAppAsync(param::async_iterable const& sourceItemList, param::hstring const& appPackageFamilyName, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessToFilesForAppAsync(*(void**)(&sourceItemList), *(void**)(&appPackageFamilyName), *(void**)(&auditInfo), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessToFilesForAppAsync(*(void**)(&sourceItemList), *(void**)(&appPackageFamilyName), *(void**)(&auditInfo), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics4::RequestAccessToFilesForAppAsync(param::async_iterable const& sourceItemList, param::hstring const& appPackageFamilyName, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo, param::hstring const& messageFromApp, winrt::Windows::Security::EnterpriseData::ProtectionPolicyRequestAccessBehavior const& behavior) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessToFilesForAppWithMessageAndBehaviorAsync(*(void**)(&sourceItemList), *(void**)(&appPackageFamilyName), *(void**)(&auditInfo), *(void**)(&messageFromApp), static_cast(behavior), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessToFilesForAppWithMessageAndBehaviorAsync(*(void**)(&sourceItemList), *(void**)(&appPackageFamilyName), *(void**)(&auditInfo), *(void**)(&messageFromApp), static_cast(behavior), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics4::RequestAccessToFilesForProcessAsync(param::async_iterable const& sourceItemList, uint32_t processId, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessToFilesForProcessAsync(*(void**)(&sourceItemList), processId, *(void**)(&auditInfo), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessToFilesForProcessAsync(*(void**)(&sourceItemList), processId, *(void**)(&auditInfo), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics4::RequestAccessToFilesForProcessAsync(param::async_iterable const& sourceItemList, uint32_t processId, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo, param::hstring const& messageFromApp, winrt::Windows::Security::EnterpriseData::ProtectionPolicyRequestAccessBehavior const& behavior) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessToFilesForProcessWithMessageAndBehaviorAsync(*(void**)(&sourceItemList), processId, *(void**)(&auditInfo), *(void**)(&messageFromApp), static_cast(behavior), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessToFilesForProcessWithMessageAndBehaviorAsync(*(void**)(&sourceItemList), processId, *(void**)(&auditInfo), *(void**)(&messageFromApp), static_cast(behavior), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics4::IsFileProtectionRequiredAsync(winrt::Windows::Storage::IStorageItem const& target, param::hstring const& identity) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IsFileProtectionRequiredAsync(*(void**)(&target), *(void**)(&identity), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsFileProtectionRequiredAsync(*(void**)(&target), *(void**)(&identity), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics4::IsFileProtectionRequiredForNewFileAsync(winrt::Windows::Storage::IStorageFolder const& parentFolder, param::hstring const& identity, param::hstring const& desiredName) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IsFileProtectionRequiredForNewFileAsync(*(void**)(&parentFolder), *(void**)(&identity), *(void**)(&desiredName), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsFileProtectionRequiredForNewFileAsync(*(void**)(&parentFolder), *(void**)(&identity), *(void**)(&desiredName), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics4::PrimaryManagedIdentity() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PrimaryManagedIdentity(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrimaryManagedIdentity(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_EnterpriseData_IProtectionPolicyManagerStatics4::GetPrimaryManagedIdentityForIdentity(param::hstring const& identity) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetPrimaryManagedIdentityForIdentity(*(void**)(&identity), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPrimaryManagedIdentityForIdentity(*(void**)(&identity), &value)); } return hstring{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Buffer(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Buffer()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProtectionInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProtectionInfo()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Identity(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Identity()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ProtectAsync(void* data, void* identity, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().ProtectAsync(*reinterpret_cast(&data), *reinterpret_cast(&identity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UnprotectAsync(void* data, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().UnprotectAsync(*reinterpret_cast(&data))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ProtectStreamAsync(void* unprotectedStream, void* identity, void* protectedStream, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().ProtectStreamAsync(*reinterpret_cast(&unprotectedStream), *reinterpret_cast(&identity), *reinterpret_cast(&protectedStream))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UnprotectStreamAsync(void* protectedStream, void* unprotectedStream, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().UnprotectStreamAsync(*reinterpret_cast(&protectedStream), *reinterpret_cast(&unprotectedStream))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetProtectionInfoAsync(void* protectedData, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetProtectionInfoAsync(*reinterpret_cast(&protectedData))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetStreamProtectionInfoAsync(void* protectedStream, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetStreamProtectionInfoAsync(*reinterpret_cast(&protectedStream))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsRoamable(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsRoamable()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Identity(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Identity()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsProtectWhileOpenSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsProtectWhileOpenSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ProtectAsync(void* target, void* identity, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().ProtectAsync(*reinterpret_cast(&target), *reinterpret_cast(&identity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CopyProtectionAsync(void* source, void* target, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().CopyProtectionAsync(*reinterpret_cast(&source), *reinterpret_cast(&target))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetProtectionInfoAsync(void* source, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetProtectionInfoAsync(*reinterpret_cast(&source))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SaveFileAsContainerAsync(void* protectedFile, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().SaveFileAsContainerAsync(*reinterpret_cast(&protectedFile))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LoadFileFromContainerAsync(void* containerFile, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().LoadFileFromContainerAsync(*reinterpret_cast(&containerFile))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LoadFileFromContainerWithTargetAsync(void* containerFile, void* target, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().LoadFileFromContainerAsync(*reinterpret_cast(&containerFile), *reinterpret_cast(&target))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateProtectedAndOpenAsync(void* parentFolder, void* desiredName, void* identity, int32_t collisionOption, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().CreateProtectedAndOpenAsync(*reinterpret_cast(&parentFolder), *reinterpret_cast(&desiredName), *reinterpret_cast(&identity), *reinterpret_cast(&collisionOption))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsContainerAsync(void* file, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().IsContainerAsync(*reinterpret_cast(&file))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LoadFileFromContainerWithTargetAndNameCollisionOptionAsync(void* containerFile, void* target, int32_t collisionOption, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().LoadFileFromContainerAsync(*reinterpret_cast(&containerFile), *reinterpret_cast(&target), *reinterpret_cast(&collisionOption))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SaveFileAsContainerWithSharingAsync(void* protectedFile, void* sharedWithIdentities, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().SaveFileAsContainerAsync(*reinterpret_cast(&protectedFile), *reinterpret_cast const*>(&sharedWithIdentities))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall UnprotectAsync(void* target, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().UnprotectAsync(*reinterpret_cast(&target))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UnprotectWithOptionsAsync(void* target, void* options, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().UnprotectAsync(*reinterpret_cast(&target), *reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ProtectAsync(void* storageItem, void* enterpriseIdentity, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().ProtectAsync(*reinterpret_cast(&storageItem), *reinterpret_cast(&enterpriseIdentity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CopyProtectionAsync(void* sourceStorageItem, void* targetStorageItem, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().CopyProtectionAsync(*reinterpret_cast(&sourceStorageItem), *reinterpret_cast(&targetStorageItem))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Revoke(void* enterpriseIdentity) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Revoke(*reinterpret_cast(&enterpriseIdentity)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetStatusAsync(void* storageItem, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetStatusAsync(*reinterpret_cast(&storageItem))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_Audit(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Audit(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Audit(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Audit()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(bool audit, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(audit)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Identities(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Identities()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Identities(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Identities()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Deadline(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Deadline()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_File(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().File()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_File(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().File()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Identities(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Identities()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_File(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().File()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Stream(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Stream()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProtectionInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProtectionInfo()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_Action(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Action(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Action(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Action()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DataDescription(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DataDescription(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DataDescription(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DataDescription()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SourceDescription(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SourceDescription(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SourceDescription(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SourceDescription()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TargetDescription(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TargetDescription(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TargetDescription(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TargetDescription()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(int32_t action, void* dataDescription, void* sourceDescription, void* targetDescription, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast(&action), *reinterpret_cast(&dataDescription), *reinterpret_cast(&sourceDescription), *reinterpret_cast(&targetDescription))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithActionAndDataDescription(int32_t action, void* dataDescription, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWithActionAndDataDescription(*reinterpret_cast(&action), *reinterpret_cast(&dataDescription))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_Identity(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Identity(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Identity(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Identity()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_ShowEnterpriseIndicator(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowEnterpriseIndicator(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ShowEnterpriseIndicator(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShowEnterpriseIndicator()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsIdentityManaged(void* identity, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsIdentityManaged(*reinterpret_cast(&identity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryApplyProcessUIPolicy(void* identity, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TryApplyProcessUIPolicy(*reinterpret_cast(&identity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ClearProcessUIPolicy() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClearProcessUIPolicy(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateCurrentThreadNetworkContext(void* identity, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateCurrentThreadNetworkContext(*reinterpret_cast(&identity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPrimaryManagedIdentityForNetworkEndpointAsync(void* endpointHost, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetPrimaryManagedIdentityForNetworkEndpointAsync(*reinterpret_cast(&endpointHost))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RevokeContent(void* identity) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RevokeContent(*reinterpret_cast(&identity)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetForCurrentView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetForCurrentView()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ProtectedAccessSuspending(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ProtectedAccessSuspending(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ProtectedAccessSuspending(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ProtectedAccessSuspending(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_ProtectedAccessResumed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ProtectedAccessResumed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ProtectedAccessResumed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ProtectedAccessResumed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_ProtectedContentRevoked(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ProtectedContentRevoked(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ProtectedContentRevoked(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ProtectedContentRevoked(*reinterpret_cast(&token)); return 0; } int32_t __stdcall CheckAccess(void* sourceIdentity, void* targetIdentity, int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CheckAccess(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessAsync(void* sourceIdentity, void* targetIdentity, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall HasContentBeenRevokedSince(void* identity, int64_t since, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().HasContentBeenRevokedSince(*reinterpret_cast(&identity), *reinterpret_cast(&since))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CheckAccessForApp(void* sourceIdentity, void* appPackageFamilyName, int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CheckAccessForApp(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessForAppAsync(void* sourceIdentity, void* appPackageFamilyName, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessForAppAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetEnforcementLevel(void* identity, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetEnforcementLevel(*reinterpret_cast(&identity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsUserDecryptionAllowed(void* identity, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsUserDecryptionAllowed(*reinterpret_cast(&identity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsProtectionUnderLockRequired(void* identity, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsProtectionUnderLockRequired(*reinterpret_cast(&identity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_PolicyChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PolicyChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PolicyChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PolicyChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_IsProtectionEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsProtectionEnabled()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RequestAccessWithAuditingInfoAsync(void* sourceIdentity, void* targetIdentity, void* auditInfo, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity), *reinterpret_cast(&auditInfo))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessWithMessageAsync(void* sourceIdentity, void* targetIdentity, void* auditInfo, void* messageFromApp, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity), *reinterpret_cast(&auditInfo), *reinterpret_cast(&messageFromApp))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessForAppWithAuditingInfoAsync(void* sourceIdentity, void* appPackageFamilyName, void* auditInfo, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessForAppAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName), *reinterpret_cast(&auditInfo))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessForAppWithMessageAsync(void* sourceIdentity, void* appPackageFamilyName, void* auditInfo, void* messageFromApp, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessForAppAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName), *reinterpret_cast(&auditInfo), *reinterpret_cast(&messageFromApp))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LogAuditEvent(void* sourceIdentity, void* targetIdentity, void* auditInfo) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().LogAuditEvent(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity), *reinterpret_cast(&auditInfo)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsRoamableProtectionEnabled(void* identity, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsRoamableProtectionEnabled(*reinterpret_cast(&identity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessWithBehaviorAsync(void* sourceIdentity, void* targetIdentity, void* auditInfo, void* messageFromApp, int32_t behavior, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&targetIdentity), *reinterpret_cast(&auditInfo), *reinterpret_cast(&messageFromApp), *reinterpret_cast(&behavior))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessForAppWithBehaviorAsync(void* sourceIdentity, void* appPackageFamilyName, void* auditInfo, void* messageFromApp, int32_t behavior, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessForAppAsync(*reinterpret_cast(&sourceIdentity), *reinterpret_cast(&appPackageFamilyName), *reinterpret_cast(&auditInfo), *reinterpret_cast(&messageFromApp), *reinterpret_cast(&behavior))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessToFilesForAppAsync(void* sourceItemList, void* appPackageFamilyName, void* auditInfo, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessToFilesForAppAsync(*reinterpret_cast const*>(&sourceItemList), *reinterpret_cast(&appPackageFamilyName), *reinterpret_cast(&auditInfo))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessToFilesForAppWithMessageAndBehaviorAsync(void* sourceItemList, void* appPackageFamilyName, void* auditInfo, void* messageFromApp, int32_t behavior, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessToFilesForAppAsync(*reinterpret_cast const*>(&sourceItemList), *reinterpret_cast(&appPackageFamilyName), *reinterpret_cast(&auditInfo), *reinterpret_cast(&messageFromApp), *reinterpret_cast(&behavior))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessToFilesForProcessAsync(void* sourceItemList, uint32_t processId, void* auditInfo, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessToFilesForProcessAsync(*reinterpret_cast const*>(&sourceItemList), processId, *reinterpret_cast(&auditInfo))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessToFilesForProcessWithMessageAndBehaviorAsync(void* sourceItemList, uint32_t processId, void* auditInfo, void* messageFromApp, int32_t behavior, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessToFilesForProcessAsync(*reinterpret_cast const*>(&sourceItemList), processId, *reinterpret_cast(&auditInfo), *reinterpret_cast(&messageFromApp), *reinterpret_cast(&behavior))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsFileProtectionRequiredAsync(void* target, void* identity, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().IsFileProtectionRequiredAsync(*reinterpret_cast(&target), *reinterpret_cast(&identity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsFileProtectionRequiredForNewFileAsync(void* parentFolder, void* identity, void* desiredName, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().IsFileProtectionRequiredForNewFileAsync(*reinterpret_cast(&parentFolder), *reinterpret_cast(&identity), *reinterpret_cast(&desiredName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrimaryManagedIdentity(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrimaryManagedIdentity()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPrimaryManagedIdentityForIdentity(void* identity, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetPrimaryManagedIdentityForIdentity(*reinterpret_cast(&identity))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif } WINRT_EXPORT namespace winrt::Windows::Security::EnterpriseData { inline auto DataProtectionManager::ProtectAsync(winrt::Windows::Storage::Streams::IBuffer const& data, param::hstring const& identity) { return impl::call_factory([&](IDataProtectionManagerStatics const& f) { return f.ProtectAsync(data, identity); }); } inline auto DataProtectionManager::UnprotectAsync(winrt::Windows::Storage::Streams::IBuffer const& data) { return impl::call_factory([&](IDataProtectionManagerStatics const& f) { return f.UnprotectAsync(data); }); } inline auto DataProtectionManager::ProtectStreamAsync(winrt::Windows::Storage::Streams::IInputStream const& unprotectedStream, param::hstring const& identity, winrt::Windows::Storage::Streams::IOutputStream const& protectedStream) { return impl::call_factory([&](IDataProtectionManagerStatics const& f) { return f.ProtectStreamAsync(unprotectedStream, identity, protectedStream); }); } inline auto DataProtectionManager::UnprotectStreamAsync(winrt::Windows::Storage::Streams::IInputStream const& protectedStream, winrt::Windows::Storage::Streams::IOutputStream const& unprotectedStream) { return impl::call_factory([&](IDataProtectionManagerStatics const& f) { return f.UnprotectStreamAsync(protectedStream, unprotectedStream); }); } inline auto DataProtectionManager::GetProtectionInfoAsync(winrt::Windows::Storage::Streams::IBuffer const& protectedData) { return impl::call_factory([&](IDataProtectionManagerStatics const& f) { return f.GetProtectionInfoAsync(protectedData); }); } inline auto DataProtectionManager::GetStreamProtectionInfoAsync(winrt::Windows::Storage::Streams::IInputStream const& protectedStream) { return impl::call_factory([&](IDataProtectionManagerStatics const& f) { return f.GetStreamProtectionInfoAsync(protectedStream); }); } inline auto FileProtectionManager::ProtectAsync(winrt::Windows::Storage::IStorageItem const& target, param::hstring const& identity) { return impl::call_factory([&](IFileProtectionManagerStatics const& f) { return f.ProtectAsync(target, identity); }); } inline auto FileProtectionManager::CopyProtectionAsync(winrt::Windows::Storage::IStorageItem const& source, winrt::Windows::Storage::IStorageItem const& target) { return impl::call_factory([&](IFileProtectionManagerStatics const& f) { return f.CopyProtectionAsync(source, target); }); } inline auto FileProtectionManager::GetProtectionInfoAsync(winrt::Windows::Storage::IStorageItem const& source) { return impl::call_factory([&](IFileProtectionManagerStatics const& f) { return f.GetProtectionInfoAsync(source); }); } inline auto FileProtectionManager::SaveFileAsContainerAsync(winrt::Windows::Storage::IStorageFile const& protectedFile) { return impl::call_factory([&](IFileProtectionManagerStatics const& f) { return f.SaveFileAsContainerAsync(protectedFile); }); } inline auto FileProtectionManager::LoadFileFromContainerAsync(winrt::Windows::Storage::IStorageFile const& containerFile) { return impl::call_factory([&](IFileProtectionManagerStatics const& f) { return f.LoadFileFromContainerAsync(containerFile); }); } inline auto FileProtectionManager::LoadFileFromContainerAsync(winrt::Windows::Storage::IStorageFile const& containerFile, winrt::Windows::Storage::IStorageItem const& target) { return impl::call_factory([&](IFileProtectionManagerStatics const& f) { return f.LoadFileFromContainerAsync(containerFile, target); }); } inline auto FileProtectionManager::CreateProtectedAndOpenAsync(winrt::Windows::Storage::IStorageFolder const& parentFolder, param::hstring const& desiredName, param::hstring const& identity, winrt::Windows::Storage::CreationCollisionOption const& collisionOption) { return impl::call_factory([&](IFileProtectionManagerStatics const& f) { return f.CreateProtectedAndOpenAsync(parentFolder, desiredName, identity, collisionOption); }); } inline auto FileProtectionManager::IsContainerAsync(winrt::Windows::Storage::IStorageFile const& file) { return impl::call_factory([&](IFileProtectionManagerStatics2 const& f) { return f.IsContainerAsync(file); }); } inline auto FileProtectionManager::LoadFileFromContainerAsync(winrt::Windows::Storage::IStorageFile const& containerFile, winrt::Windows::Storage::IStorageItem const& target, winrt::Windows::Storage::NameCollisionOption const& collisionOption) { return impl::call_factory([&](IFileProtectionManagerStatics2 const& f) { return f.LoadFileFromContainerAsync(containerFile, target, collisionOption); }); } inline auto FileProtectionManager::SaveFileAsContainerAsync(winrt::Windows::Storage::IStorageFile const& protectedFile, param::async_iterable const& sharedWithIdentities) { return impl::call_factory([&](IFileProtectionManagerStatics2 const& f) { return f.SaveFileAsContainerAsync(protectedFile, sharedWithIdentities); }); } inline auto FileProtectionManager::UnprotectAsync(winrt::Windows::Storage::IStorageItem const& target) { return impl::call_factory([&](IFileProtectionManagerStatics3 const& f) { return f.UnprotectAsync(target); }); } inline auto FileProtectionManager::UnprotectAsync(winrt::Windows::Storage::IStorageItem const& target, winrt::Windows::Security::EnterpriseData::FileUnprotectOptions const& options) { return impl::call_factory([&](IFileProtectionManagerStatics3 const& f) { return f.UnprotectAsync(target, options); }); } inline auto FileRevocationManager::ProtectAsync(winrt::Windows::Storage::IStorageItem const& storageItem, param::hstring const& enterpriseIdentity) { return impl::call_factory([&](IFileRevocationManagerStatics const& f) { return f.ProtectAsync(storageItem, enterpriseIdentity); }); } inline auto FileRevocationManager::CopyProtectionAsync(winrt::Windows::Storage::IStorageItem const& sourceStorageItem, winrt::Windows::Storage::IStorageItem const& targetStorageItem) { return impl::call_factory([&](IFileRevocationManagerStatics const& f) { return f.CopyProtectionAsync(sourceStorageItem, targetStorageItem); }); } inline auto FileRevocationManager::Revoke(param::hstring const& enterpriseIdentity) { impl::call_factory([&](IFileRevocationManagerStatics const& f) { return f.Revoke(enterpriseIdentity); }); } inline auto FileRevocationManager::GetStatusAsync(winrt::Windows::Storage::IStorageItem const& storageItem) { return impl::call_factory([&](IFileRevocationManagerStatics const& f) { return f.GetStatusAsync(storageItem); }); } inline FileUnprotectOptions::FileUnprotectOptions(bool audit) : FileUnprotectOptions(impl::call_factory([&](IFileUnprotectOptionsFactory const& f) { return f.Create(audit); })) { } inline ProtectionPolicyAuditInfo::ProtectionPolicyAuditInfo(winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditAction const& action, param::hstring const& dataDescription, param::hstring const& sourceDescription, param::hstring const& targetDescription) : ProtectionPolicyAuditInfo(impl::call_factory([&](IProtectionPolicyAuditInfoFactory const& f) { return f.Create(action, dataDescription, sourceDescription, targetDescription); })) { } inline ProtectionPolicyAuditInfo::ProtectionPolicyAuditInfo(winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditAction const& action, param::hstring const& dataDescription) : ProtectionPolicyAuditInfo(impl::call_factory([&](IProtectionPolicyAuditInfoFactory const& f) { return f.CreateWithActionAndDataDescription(action, dataDescription); })) { } inline auto ProtectionPolicyManager::IsIdentityManaged(param::hstring const& identity) { return impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.IsIdentityManaged(identity); }); } inline auto ProtectionPolicyManager::TryApplyProcessUIPolicy(param::hstring const& identity) { return impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.TryApplyProcessUIPolicy(identity); }); } inline auto ProtectionPolicyManager::ClearProcessUIPolicy() { impl::call_factory_cast([](IProtectionPolicyManagerStatics const& f) { return f.ClearProcessUIPolicy(); }); } inline auto ProtectionPolicyManager::CreateCurrentThreadNetworkContext(param::hstring const& identity) { return impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.CreateCurrentThreadNetworkContext(identity); }); } inline auto ProtectionPolicyManager::GetPrimaryManagedIdentityForNetworkEndpointAsync(winrt::Windows::Networking::HostName const& endpointHost) { return impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.GetPrimaryManagedIdentityForNetworkEndpointAsync(endpointHost); }); } inline auto ProtectionPolicyManager::RevokeContent(param::hstring const& identity) { impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.RevokeContent(identity); }); } inline auto ProtectionPolicyManager::GetForCurrentView() { return impl::call_factory_cast([](IProtectionPolicyManagerStatics const& f) { return f.GetForCurrentView(); }); } inline auto ProtectionPolicyManager::ProtectedAccessSuspending(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.ProtectedAccessSuspending(handler); }); } inline auto ProtectionPolicyManager::ProtectedAccessSuspending(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return ProtectionPolicyManager::ProtectedAccessSuspending_revoker{ f, f.ProtectedAccessSuspending(handler) }; } inline auto ProtectionPolicyManager::ProtectedAccessSuspending(winrt::event_token const& token) { impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.ProtectedAccessSuspending(token); }); } inline auto ProtectionPolicyManager::ProtectedAccessResumed(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.ProtectedAccessResumed(handler); }); } inline auto ProtectionPolicyManager::ProtectedAccessResumed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return ProtectionPolicyManager::ProtectedAccessResumed_revoker{ f, f.ProtectedAccessResumed(handler) }; } inline auto ProtectionPolicyManager::ProtectedAccessResumed(winrt::event_token const& token) { impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.ProtectedAccessResumed(token); }); } inline auto ProtectionPolicyManager::ProtectedContentRevoked(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.ProtectedContentRevoked(handler); }); } inline auto ProtectionPolicyManager::ProtectedContentRevoked(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return ProtectionPolicyManager::ProtectedContentRevoked_revoker{ f, f.ProtectedContentRevoked(handler) }; } inline auto ProtectionPolicyManager::ProtectedContentRevoked(winrt::event_token const& token) { impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.ProtectedContentRevoked(token); }); } inline auto ProtectionPolicyManager::CheckAccess(param::hstring const& sourceIdentity, param::hstring const& targetIdentity) { return impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.CheckAccess(sourceIdentity, targetIdentity); }); } inline auto ProtectionPolicyManager::RequestAccessAsync(param::hstring const& sourceIdentity, param::hstring const& targetIdentity) { return impl::call_factory([&](IProtectionPolicyManagerStatics const& f) { return f.RequestAccessAsync(sourceIdentity, targetIdentity); }); } inline auto ProtectionPolicyManager::HasContentBeenRevokedSince(param::hstring const& identity, winrt::Windows::Foundation::DateTime const& since) { return impl::call_factory([&](IProtectionPolicyManagerStatics2 const& f) { return f.HasContentBeenRevokedSince(identity, since); }); } inline auto ProtectionPolicyManager::CheckAccessForApp(param::hstring const& sourceIdentity, param::hstring const& appPackageFamilyName) { return impl::call_factory([&](IProtectionPolicyManagerStatics2 const& f) { return f.CheckAccessForApp(sourceIdentity, appPackageFamilyName); }); } inline auto ProtectionPolicyManager::RequestAccessForAppAsync(param::hstring const& sourceIdentity, param::hstring const& appPackageFamilyName) { return impl::call_factory([&](IProtectionPolicyManagerStatics2 const& f) { return f.RequestAccessForAppAsync(sourceIdentity, appPackageFamilyName); }); } inline auto ProtectionPolicyManager::GetEnforcementLevel(param::hstring const& identity) { return impl::call_factory([&](IProtectionPolicyManagerStatics2 const& f) { return f.GetEnforcementLevel(identity); }); } inline auto ProtectionPolicyManager::IsUserDecryptionAllowed(param::hstring const& identity) { return impl::call_factory([&](IProtectionPolicyManagerStatics2 const& f) { return f.IsUserDecryptionAllowed(identity); }); } inline auto ProtectionPolicyManager::IsProtectionUnderLockRequired(param::hstring const& identity) { return impl::call_factory([&](IProtectionPolicyManagerStatics2 const& f) { return f.IsProtectionUnderLockRequired(identity); }); } inline auto ProtectionPolicyManager::PolicyChanged(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IProtectionPolicyManagerStatics2 const& f) { return f.PolicyChanged(handler); }); } inline auto ProtectionPolicyManager::PolicyChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return ProtectionPolicyManager::PolicyChanged_revoker{ f, f.PolicyChanged(handler) }; } inline auto ProtectionPolicyManager::PolicyChanged(winrt::event_token const& token) { impl::call_factory([&](IProtectionPolicyManagerStatics2 const& f) { return f.PolicyChanged(token); }); } inline auto ProtectionPolicyManager::IsProtectionEnabled() { return impl::call_factory_cast([](IProtectionPolicyManagerStatics2 const& f) { return f.IsProtectionEnabled(); }); } inline auto ProtectionPolicyManager::RequestAccessAsync(param::hstring const& sourceIdentity, param::hstring const& targetIdentity, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo) { return impl::call_factory([&](IProtectionPolicyManagerStatics3 const& f) { return f.RequestAccessAsync(sourceIdentity, targetIdentity, auditInfo); }); } inline auto ProtectionPolicyManager::RequestAccessAsync(param::hstring const& sourceIdentity, param::hstring const& targetIdentity, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo, param::hstring const& messageFromApp) { return impl::call_factory([&](IProtectionPolicyManagerStatics3 const& f) { return f.RequestAccessAsync(sourceIdentity, targetIdentity, auditInfo, messageFromApp); }); } inline auto ProtectionPolicyManager::RequestAccessForAppAsync(param::hstring const& sourceIdentity, param::hstring const& appPackageFamilyName, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo) { return impl::call_factory([&](IProtectionPolicyManagerStatics3 const& f) { return f.RequestAccessForAppAsync(sourceIdentity, appPackageFamilyName, auditInfo); }); } inline auto ProtectionPolicyManager::RequestAccessForAppAsync(param::hstring const& sourceIdentity, param::hstring const& appPackageFamilyName, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo, param::hstring const& messageFromApp) { return impl::call_factory([&](IProtectionPolicyManagerStatics3 const& f) { return f.RequestAccessForAppAsync(sourceIdentity, appPackageFamilyName, auditInfo, messageFromApp); }); } inline auto ProtectionPolicyManager::LogAuditEvent(param::hstring const& sourceIdentity, param::hstring const& targetIdentity, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo) { impl::call_factory([&](IProtectionPolicyManagerStatics3 const& f) { return f.LogAuditEvent(sourceIdentity, targetIdentity, auditInfo); }); } inline auto ProtectionPolicyManager::IsRoamableProtectionEnabled(param::hstring const& identity) { return impl::call_factory([&](IProtectionPolicyManagerStatics4 const& f) { return f.IsRoamableProtectionEnabled(identity); }); } inline auto ProtectionPolicyManager::RequestAccessAsync(param::hstring const& sourceIdentity, param::hstring const& targetIdentity, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo, param::hstring const& messageFromApp, winrt::Windows::Security::EnterpriseData::ProtectionPolicyRequestAccessBehavior const& behavior) { return impl::call_factory([&](IProtectionPolicyManagerStatics4 const& f) { return f.RequestAccessAsync(sourceIdentity, targetIdentity, auditInfo, messageFromApp, behavior); }); } inline auto ProtectionPolicyManager::RequestAccessForAppAsync(param::hstring const& sourceIdentity, param::hstring const& appPackageFamilyName, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo, param::hstring const& messageFromApp, winrt::Windows::Security::EnterpriseData::ProtectionPolicyRequestAccessBehavior const& behavior) { return impl::call_factory([&](IProtectionPolicyManagerStatics4 const& f) { return f.RequestAccessForAppAsync(sourceIdentity, appPackageFamilyName, auditInfo, messageFromApp, behavior); }); } inline auto ProtectionPolicyManager::RequestAccessToFilesForAppAsync(param::async_iterable const& sourceItemList, param::hstring const& appPackageFamilyName, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo) { return impl::call_factory([&](IProtectionPolicyManagerStatics4 const& f) { return f.RequestAccessToFilesForAppAsync(sourceItemList, appPackageFamilyName, auditInfo); }); } inline auto ProtectionPolicyManager::RequestAccessToFilesForAppAsync(param::async_iterable const& sourceItemList, param::hstring const& appPackageFamilyName, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo, param::hstring const& messageFromApp, winrt::Windows::Security::EnterpriseData::ProtectionPolicyRequestAccessBehavior const& behavior) { return impl::call_factory([&](IProtectionPolicyManagerStatics4 const& f) { return f.RequestAccessToFilesForAppAsync(sourceItemList, appPackageFamilyName, auditInfo, messageFromApp, behavior); }); } inline auto ProtectionPolicyManager::RequestAccessToFilesForProcessAsync(param::async_iterable const& sourceItemList, uint32_t processId, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo) { return impl::call_factory([&](IProtectionPolicyManagerStatics4 const& f) { return f.RequestAccessToFilesForProcessAsync(sourceItemList, processId, auditInfo); }); } inline auto ProtectionPolicyManager::RequestAccessToFilesForProcessAsync(param::async_iterable const& sourceItemList, uint32_t processId, winrt::Windows::Security::EnterpriseData::ProtectionPolicyAuditInfo const& auditInfo, param::hstring const& messageFromApp, winrt::Windows::Security::EnterpriseData::ProtectionPolicyRequestAccessBehavior const& behavior) { return impl::call_factory([&](IProtectionPolicyManagerStatics4 const& f) { return f.RequestAccessToFilesForProcessAsync(sourceItemList, processId, auditInfo, messageFromApp, behavior); }); } inline auto ProtectionPolicyManager::IsFileProtectionRequiredAsync(winrt::Windows::Storage::IStorageItem const& target, param::hstring const& identity) { return impl::call_factory([&](IProtectionPolicyManagerStatics4 const& f) { return f.IsFileProtectionRequiredAsync(target, identity); }); } inline auto ProtectionPolicyManager::IsFileProtectionRequiredForNewFileAsync(winrt::Windows::Storage::IStorageFolder const& parentFolder, param::hstring const& identity, param::hstring const& desiredName) { return impl::call_factory([&](IProtectionPolicyManagerStatics4 const& f) { return f.IsFileProtectionRequiredForNewFileAsync(parentFolder, identity, desiredName); }); } inline auto ProtectionPolicyManager::PrimaryManagedIdentity() { return impl::call_factory_cast([](IProtectionPolicyManagerStatics4 const& f) { return f.PrimaryManagedIdentity(); }); } inline auto ProtectionPolicyManager::GetPrimaryManagedIdentityForIdentity(param::hstring const& identity) { return impl::call_factory([&](IProtectionPolicyManagerStatics4 const& f) { return f.GetPrimaryManagedIdentityForIdentity(identity); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif