// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Security_Credentials_UI_H #define WINRT_Windows_Security_Credentials_UI_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/Windows.Security.Credentials.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.Security.Credentials.UI.2.h" namespace winrt::impl { template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::Caption(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->put_Caption(*(void**)(&value))); } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::Caption() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->get_Caption(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::Message(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->put_Message(*(void**)(&value))); } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::Message() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->get_Message(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::ErrorCode(uint32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->put_ErrorCode(value)); } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::ErrorCode() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->get_ErrorCode(&value)); return value; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::TargetName(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->put_TargetName(*(void**)(&value))); } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::TargetName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->get_TargetName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::AuthenticationProtocol(winrt::Windows::Security::Credentials::UI::AuthenticationProtocol const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->put_AuthenticationProtocol(static_cast(value))); } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::AuthenticationProtocol() const { winrt::Windows::Security::Credentials::UI::AuthenticationProtocol value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->get_AuthenticationProtocol(reinterpret_cast(&value))); return value; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::CustomAuthenticationProtocol(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->put_CustomAuthenticationProtocol(*(void**)(&value))); } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::CustomAuthenticationProtocol() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->get_CustomAuthenticationProtocol(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::PreviousCredential(winrt::Windows::Storage::Streams::IBuffer const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->put_PreviousCredential(*(void**)(&value))); } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::PreviousCredential() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->get_PreviousCredential(&value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::AlwaysDisplayDialog(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->put_AlwaysDisplayDialog(value)); } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::AlwaysDisplayDialog() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->get_AlwaysDisplayDialog(&value)); return value; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::CallerSavesCredential(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->put_CallerSavesCredential(value)); } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::CallerSavesCredential() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->get_CallerSavesCredential(&value)); return value; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::CredentialSaveOption(winrt::Windows::Security::Credentials::UI::CredentialSaveOption const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->put_CredentialSaveOption(static_cast(value))); } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerOptions::CredentialSaveOption() const { winrt::Windows::Security::Credentials::UI::CredentialSaveOption value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerOptions)->get_CredentialSaveOption(reinterpret_cast(&value))); return value; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerResults::ErrorCode() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerResults)->get_ErrorCode(&value)); return value; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerResults::CredentialSaveOption() const { winrt::Windows::Security::Credentials::UI::CredentialSaveOption value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerResults)->get_CredentialSaveOption(reinterpret_cast(&value))); return value; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerResults::CredentialSaved() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerResults)->get_CredentialSaved(&value)); return value; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerResults::Credential() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerResults)->get_Credential(&value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerResults::CredentialDomainName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerResults)->get_CredentialDomainName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerResults::CredentialUserName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerResults)->get_CredentialUserName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerResults::CredentialPassword() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerResults)->get_CredentialPassword(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerStatics::PickAsync(winrt::Windows::Security::Credentials::UI::CredentialPickerOptions const& options) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerStatics)->PickWithOptionsAsync(*(void**)(&options), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerStatics::PickAsync(param::hstring const& targetName, param::hstring const& message) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerStatics)->PickWithMessageAsync(*(void**)(&targetName), *(void**)(&message), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_ICredentialPickerStatics::PickAsync(param::hstring const& targetName, param::hstring const& message, param::hstring const& caption) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::ICredentialPickerStatics)->PickWithCaptionAsync(*(void**)(&targetName), *(void**)(&message), *(void**)(&caption), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_IUserConsentVerifierStatics::CheckAvailabilityAsync() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::IUserConsentVerifierStatics)->CheckAvailabilityAsync(&result)); return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_UI_IUserConsentVerifierStatics::RequestVerificationAsync(param::hstring const& message) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::UI::IUserConsentVerifierStatics)->RequestVerificationAsync(*(void**)(&message), &result)); return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_Caption(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Caption(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Caption(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Caption()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Message(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Message(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Message(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Message()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ErrorCode(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ErrorCode(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ErrorCode(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ErrorCode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TargetName(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TargetName(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TargetName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TargetName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AuthenticationProtocol(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AuthenticationProtocol(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AuthenticationProtocol(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AuthenticationProtocol()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CustomAuthenticationProtocol(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CustomAuthenticationProtocol(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CustomAuthenticationProtocol(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CustomAuthenticationProtocol()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PreviousCredential(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PreviousCredential(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PreviousCredential(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PreviousCredential()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AlwaysDisplayDialog(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AlwaysDisplayDialog(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AlwaysDisplayDialog(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AlwaysDisplayDialog()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CallerSavesCredential(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CallerSavesCredential(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CallerSavesCredential(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CallerSavesCredential()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CredentialSaveOption(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CredentialSaveOption(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CredentialSaveOption(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CredentialSaveOption()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ErrorCode(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ErrorCode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CredentialSaveOption(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CredentialSaveOption()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CredentialSaved(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CredentialSaved()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Credential(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Credential()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CredentialDomainName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CredentialDomainName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CredentialUserName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CredentialUserName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CredentialPassword(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CredentialPassword()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall PickWithOptionsAsync(void* options, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().PickAsync(*reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PickWithMessageAsync(void* targetName, void* message, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().PickAsync(*reinterpret_cast(&targetName), *reinterpret_cast(&message))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PickWithCaptionAsync(void* targetName, void* message, void* caption, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().PickAsync(*reinterpret_cast(&targetName), *reinterpret_cast(&message), *reinterpret_cast(&caption))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CheckAvailabilityAsync(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().CheckAvailabilityAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestVerificationAsync(void* message, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestVerificationAsync(*reinterpret_cast(&message))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Security::Credentials::UI { inline auto CredentialPicker::PickAsync(winrt::Windows::Security::Credentials::UI::CredentialPickerOptions const& options) { return impl::call_factory([&](ICredentialPickerStatics const& f) { return f.PickAsync(options); }); } inline auto CredentialPicker::PickAsync(param::hstring const& targetName, param::hstring const& message) { return impl::call_factory([&](ICredentialPickerStatics const& f) { return f.PickAsync(targetName, message); }); } inline auto CredentialPicker::PickAsync(param::hstring const& targetName, param::hstring const& message, param::hstring const& caption) { return impl::call_factory([&](ICredentialPickerStatics const& f) { return f.PickAsync(targetName, message, caption); }); } inline CredentialPickerOptions::CredentialPickerOptions() : CredentialPickerOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto UserConsentVerifier::CheckAvailabilityAsync() { return impl::call_factory_cast(*)(IUserConsentVerifierStatics const&), UserConsentVerifier, IUserConsentVerifierStatics>([](IUserConsentVerifierStatics const& f) { return f.CheckAvailabilityAsync(); }); } inline auto UserConsentVerifier::RequestVerificationAsync(param::hstring const& message) { return impl::call_factory([&](IUserConsentVerifierStatics const& f) { return f.RequestVerificationAsync(message); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif