// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Security_Credentials_H #define WINRT_Windows_Security_Credentials_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/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Security.Cryptography.Core.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.System.2.h" #include "winrt/impl/Windows.Security.Credentials.2.h" namespace winrt::impl { template auto consume_Windows_Security_Credentials_ICredentialFactory::CreatePasswordCredential(param::hstring const& resource, param::hstring const& userName, param::hstring const& password) const { void* credential{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::ICredentialFactory)->CreatePasswordCredential(*(void**)(&resource), *(void**)(&userName), *(void**)(&password), &credential)); return winrt::Windows::Security::Credentials::PasswordCredential{ credential, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredential::Name() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredential)->get_Name(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredential::RetrievePublicKey() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredential)->RetrievePublicKeyWithDefaultBlobType(&value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredential::RetrievePublicKey(winrt::Windows::Security::Cryptography::Core::CryptographicPublicKeyBlobType const& blobType) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredential)->RetrievePublicKeyWithBlobType(static_cast(blobType), &value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredential::RequestSignAsync(winrt::Windows::Storage::Streams::IBuffer const& data) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredential)->RequestSignAsync(*(void**)(&data), &value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredential::GetAttestationAsync() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredential)->GetAttestationAsync(&value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredentialAttestationResult::CertificateChainBuffer() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult)->get_CertificateChainBuffer(&value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredentialAttestationResult::AttestationBuffer() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult)->get_AttestationBuffer(&value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredentialAttestationResult::Status() const { winrt::Windows::Security::Credentials::KeyCredentialAttestationStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredentialAttestationResult)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Windows_Security_Credentials_IKeyCredentialManagerStatics::IsSupportedAsync() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics)->IsSupportedAsync(&value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredentialManagerStatics::RenewAttestationAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics)->RenewAttestationAsync(&operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredentialManagerStatics::RequestCreateAsync(param::hstring const& name, winrt::Windows::Security::Credentials::KeyCredentialCreationOption const& option) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics)->RequestCreateAsync(*(void**)(&name), static_cast(option), &value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredentialManagerStatics::OpenAsync(param::hstring const& name) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics)->OpenAsync(*(void**)(&name), &value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredentialManagerStatics::DeleteAsync(param::hstring const& name) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredentialManagerStatics)->DeleteAsync(*(void**)(&name), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredentialOperationResult::Result() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredentialOperationResult)->get_Result(&value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredentialOperationResult::Status() const { winrt::Windows::Security::Credentials::KeyCredentialStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredentialOperationResult)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Windows_Security_Credentials_IKeyCredentialRetrievalResult::Credential() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult)->get_Credential(&value)); return winrt::Windows::Security::Credentials::KeyCredential{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IKeyCredentialRetrievalResult::Status() const { winrt::Windows::Security::Credentials::KeyCredentialStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IKeyCredentialRetrievalResult)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Windows_Security_Credentials_IPasswordCredential::Resource() const { void* resource{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordCredential)->get_Resource(&resource)); return hstring{ resource, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IPasswordCredential::Resource(param::hstring const& resource) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordCredential)->put_Resource(*(void**)(&resource))); } template auto consume_Windows_Security_Credentials_IPasswordCredential::UserName() const { void* userName{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordCredential)->get_UserName(&userName)); return hstring{ userName, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IPasswordCredential::UserName(param::hstring const& userName) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordCredential)->put_UserName(*(void**)(&userName))); } template auto consume_Windows_Security_Credentials_IPasswordCredential::Password() const { void* password{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordCredential)->get_Password(&password)); return hstring{ password, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IPasswordCredential::Password(param::hstring const& password) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordCredential)->put_Password(*(void**)(&password))); } template auto consume_Windows_Security_Credentials_IPasswordCredential::RetrievePassword() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordCredential)->RetrievePassword()); } template auto consume_Windows_Security_Credentials_IPasswordCredential::Properties() const { void* props{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordCredential)->get_Properties(&props)); return winrt::Windows::Foundation::Collections::IPropertySet{ props, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IPasswordVault::Add(winrt::Windows::Security::Credentials::PasswordCredential const& credential) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordVault)->Add(*(void**)(&credential))); } template auto consume_Windows_Security_Credentials_IPasswordVault::Remove(winrt::Windows::Security::Credentials::PasswordCredential const& credential) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordVault)->Remove(*(void**)(&credential))); } template auto consume_Windows_Security_Credentials_IPasswordVault::Retrieve(param::hstring const& resource, param::hstring const& userName) const { void* credential{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordVault)->Retrieve(*(void**)(&resource), *(void**)(&userName), &credential)); return winrt::Windows::Security::Credentials::PasswordCredential{ credential, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IPasswordVault::FindAllByResource(param::hstring const& resource) const { void* credentials{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordVault)->FindAllByResource(*(void**)(&resource), &credentials)); return winrt::Windows::Foundation::Collections::IVectorView{ credentials, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IPasswordVault::FindAllByUserName(param::hstring const& userName) const { void* credentials{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordVault)->FindAllByUserName(*(void**)(&userName), &credentials)); return winrt::Windows::Foundation::Collections::IVectorView{ credentials, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IPasswordVault::RetrieveAll() const { void* credentials{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IPasswordVault)->RetrieveAll(&credentials)); return winrt::Windows::Foundation::Collections::IVectorView{ credentials, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccount::WebAccountProvider() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccount)->get_WebAccountProvider(&value)); return winrt::Windows::Security::Credentials::WebAccountProvider{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccount::UserName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccount)->get_UserName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccount::State() const { winrt::Windows::Security::Credentials::WebAccountState value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccount)->get_State(reinterpret_cast(&value))); return value; } template auto consume_Windows_Security_Credentials_IWebAccount2::Id() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccount2)->get_Id(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccount2::Properties() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccount2)->get_Properties(&value)); return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccount2::GetPictureAsync(winrt::Windows::Security::Credentials::WebAccountPictureSize const& desizedSize) const { void* asyncInfo{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccount2)->GetPictureAsync(static_cast(desizedSize), &asyncInfo)); return winrt::Windows::Foundation::IAsyncOperation{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccount2::SignOutAsync() const { void* asyncInfo{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccount2)->SignOutAsync(&asyncInfo)); return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccount2::SignOutAsync(param::hstring const& clientId) const { void* asyncInfo{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccount2)->SignOutWithClientIdAsync(*(void**)(&clientId), &asyncInfo)); return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccountFactory::CreateWebAccount(winrt::Windows::Security::Credentials::WebAccountProvider const& webAccountProvider, param::hstring const& userName, winrt::Windows::Security::Credentials::WebAccountState const& state) const { void* instance{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccountFactory)->CreateWebAccount(*(void**)(&webAccountProvider), *(void**)(&userName), static_cast(state), &instance)); return winrt::Windows::Security::Credentials::WebAccount{ instance, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccountProvider::Id() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccountProvider)->get_Id(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccountProvider::DisplayName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccountProvider)->get_DisplayName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccountProvider::IconUri() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccountProvider)->get_IconUri(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccountProvider2::DisplayPurpose() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccountProvider2)->get_DisplayPurpose(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccountProvider2::Authority() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccountProvider2)->get_Authority(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccountProvider3::User() const { void* user{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccountProvider3)->get_User(&user)); return winrt::Windows::System::User{ user, take_ownership_from_abi }; } template auto consume_Windows_Security_Credentials_IWebAccountProvider4::IsSystemProvider() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccountProvider4)->get_IsSystemProvider(&value)); return value; } template auto consume_Windows_Security_Credentials_IWebAccountProviderFactory::CreateWebAccountProvider(param::hstring const& id, param::hstring const& displayName, winrt::Windows::Foundation::Uri const& iconUri) const { void* instance{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Security::Credentials::IWebAccountProviderFactory)->CreateWebAccountProvider(*(void**)(&id), *(void**)(&displayName), *(void**)(&iconUri), &instance)); return winrt::Windows::Security::Credentials::WebAccountProvider{ instance, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreatePasswordCredential(void* resource, void* userName, void* password, void** credential) noexcept final try { clear_abi(credential); typename D::abi_guard guard(this->shim()); *credential = detach_from(this->shim().CreatePasswordCredential(*reinterpret_cast(&resource), *reinterpret_cast(&userName), *reinterpret_cast(&password))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Name(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Name()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RetrievePublicKeyWithDefaultBlobType(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RetrievePublicKey()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RetrievePublicKeyWithBlobType(int32_t blobType, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RetrievePublicKey(*reinterpret_cast(&blobType))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestSignAsync(void* data, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RequestSignAsync(*reinterpret_cast(&data))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAttestationAsync(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetAttestationAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CertificateChainBuffer(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CertificateChainBuffer()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AttestationBuffer(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AttestationBuffer()); return 0; } catch (...) { return to_hresult(); } 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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsSupportedAsync(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().IsSupportedAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RenewAttestationAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().RenewAttestationAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestCreateAsync(void* name, int32_t option, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RequestCreateAsync(*reinterpret_cast(&name), *reinterpret_cast(&option))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall OpenAsync(void* name, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().OpenAsync(*reinterpret_cast(&name))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DeleteAsync(void* name, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().DeleteAsync(*reinterpret_cast(&name))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Result(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Result()); return 0; } catch (...) { return to_hresult(); } 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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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_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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Resource(void** resource) noexcept final try { clear_abi(resource); typename D::abi_guard guard(this->shim()); *resource = detach_from(this->shim().Resource()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Resource(void* resource) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Resource(*reinterpret_cast(&resource)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UserName(void** userName) noexcept final try { clear_abi(userName); typename D::abi_guard guard(this->shim()); *userName = detach_from(this->shim().UserName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_UserName(void* userName) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UserName(*reinterpret_cast(&userName)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Password(void** password) noexcept final try { clear_abi(password); typename D::abi_guard guard(this->shim()); *password = detach_from(this->shim().Password()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Password(void* password) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Password(*reinterpret_cast(&password)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RetrievePassword() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RetrievePassword(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Properties(void** props) noexcept final try { clear_abi(props); typename D::abi_guard guard(this->shim()); *props = detach_from(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Add(void* credential) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Add(*reinterpret_cast(&credential)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Remove(void* credential) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&credential)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Retrieve(void* resource, void* userName, void** credential) noexcept final try { clear_abi(credential); typename D::abi_guard guard(this->shim()); *credential = detach_from(this->shim().Retrieve(*reinterpret_cast(&resource), *reinterpret_cast(&userName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllByResource(void* resource, void** credentials) noexcept final try { clear_abi(credentials); typename D::abi_guard guard(this->shim()); *credentials = detach_from>(this->shim().FindAllByResource(*reinterpret_cast(&resource))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllByUserName(void* userName, void** credentials) noexcept final try { clear_abi(credentials); typename D::abi_guard guard(this->shim()); *credentials = detach_from>(this->shim().FindAllByUserName(*reinterpret_cast(&userName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RetrieveAll(void** credentials) noexcept final try { clear_abi(credentials); typename D::abi_guard guard(this->shim()); *credentials = detach_from>(this->shim().RetrieveAll()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_WebAccountProvider(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WebAccountProvider()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UserName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UserName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_State(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPictureAsync(int32_t desizedSize, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from>(this->shim().GetPictureAsync(*reinterpret_cast(&desizedSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SignOutAsync(void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SignOutAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SignOutWithClientIdAsync(void* clientId, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SignOutAsync(*reinterpret_cast(&clientId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWebAccount(void* webAccountProvider, void* userName, int32_t state, void** instance) noexcept final try { clear_abi(instance); typename D::abi_guard guard(this->shim()); *instance = detach_from(this->shim().CreateWebAccount(*reinterpret_cast(&webAccountProvider), *reinterpret_cast(&userName), *reinterpret_cast(&state))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DisplayName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IconUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IconUri()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DisplayPurpose(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayPurpose()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Authority(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Authority()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_User(void** user) noexcept final try { clear_abi(user); typename D::abi_guard guard(this->shim()); *user = detach_from(this->shim().User()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsSystemProvider(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSystemProvider()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWebAccountProvider(void* id, void* displayName, void* iconUri, void** instance) noexcept final try { clear_abi(instance); typename D::abi_guard guard(this->shim()); *instance = detach_from(this->shim().CreateWebAccountProvider(*reinterpret_cast(&id), *reinterpret_cast(&displayName), *reinterpret_cast(&iconUri))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Security::Credentials { inline auto KeyCredentialManager::IsSupportedAsync() { return impl::call_factory_cast(*)(IKeyCredentialManagerStatics const&), KeyCredentialManager, IKeyCredentialManagerStatics>([](IKeyCredentialManagerStatics const& f) { return f.IsSupportedAsync(); }); } inline auto KeyCredentialManager::RenewAttestationAsync() { return impl::call_factory_cast([](IKeyCredentialManagerStatics const& f) { return f.RenewAttestationAsync(); }); } inline auto KeyCredentialManager::RequestCreateAsync(param::hstring const& name, winrt::Windows::Security::Credentials::KeyCredentialCreationOption const& option) { return impl::call_factory([&](IKeyCredentialManagerStatics const& f) { return f.RequestCreateAsync(name, option); }); } inline auto KeyCredentialManager::OpenAsync(param::hstring const& name) { return impl::call_factory([&](IKeyCredentialManagerStatics const& f) { return f.OpenAsync(name); }); } inline auto KeyCredentialManager::DeleteAsync(param::hstring const& name) { return impl::call_factory([&](IKeyCredentialManagerStatics const& f) { return f.DeleteAsync(name); }); } inline PasswordCredential::PasswordCredential() : PasswordCredential(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline PasswordCredential::PasswordCredential(param::hstring const& resource, param::hstring const& userName, param::hstring const& password) : PasswordCredential(impl::call_factory([&](ICredentialFactory const& f) { return f.CreatePasswordCredential(resource, userName, password); })) { } inline PasswordCredentialPropertyStore::PasswordCredentialPropertyStore() : PasswordCredentialPropertyStore(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline PasswordVault::PasswordVault() : PasswordVault(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline WebAccount::WebAccount(winrt::Windows::Security::Credentials::WebAccountProvider const& webAccountProvider, param::hstring const& userName, winrt::Windows::Security::Credentials::WebAccountState const& state) : WebAccount(impl::call_factory([&](IWebAccountFactory const& f) { return f.CreateWebAccount(webAccountProvider, userName, state); })) { } inline WebAccountProvider::WebAccountProvider(param::hstring const& id, param::hstring const& displayName, winrt::Windows::Foundation::Uri const& iconUri) : WebAccountProvider(impl::call_factory([&](IWebAccountProviderFactory const& f) { return f.CreateWebAccountProvider(id, displayName, iconUri); })) { } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif