// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_System_UserProfile_H #define WINRT_Windows_System_UserProfile_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.System.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Globalization.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.System.2.h" #include "winrt/impl/Windows.System.UserProfile.2.h" namespace winrt::impl { template auto consume_Windows_System_UserProfile_IAdvertisingManagerForUser::AdvertisingId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IAdvertisingManagerForUser)->get_AdvertisingId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IAdvertisingManagerForUser::User() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IAdvertisingManagerForUser)->get_User(&value)); return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IAdvertisingManagerStatics::AdvertisingId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IAdvertisingManagerStatics)->get_AdvertisingId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IAdvertisingManagerStatics2::GetForUser(winrt::Windows::System::User const& user) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IAdvertisingManagerStatics2)->GetForUser(*(void**)(&user), &value)); return winrt::Windows::System::UserProfile::AdvertisingManagerForUser{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IAssignedAccessSettings::IsEnabled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IAssignedAccessSettings)->get_IsEnabled(&value)); return value; } template auto consume_Windows_System_UserProfile_IAssignedAccessSettings::IsSingleAppKioskMode() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IAssignedAccessSettings)->get_IsSingleAppKioskMode(&value)); return value; } template auto consume_Windows_System_UserProfile_IAssignedAccessSettings::User() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IAssignedAccessSettings)->get_User(&value)); return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IAssignedAccessSettingsStatics::GetDefault() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IAssignedAccessSettingsStatics)->GetDefault(&result)); return winrt::Windows::System::UserProfile::AssignedAccessSettings{ result, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IAssignedAccessSettingsStatics::GetForUser(winrt::Windows::System::User const& user) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IAssignedAccessSettingsStatics)->GetForUser(*(void**)(&user), &result)); return winrt::Windows::System::UserProfile::AssignedAccessSettings{ result, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IDiagnosticsSettings::CanUseDiagnosticsToTailorExperiences() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IDiagnosticsSettings)->get_CanUseDiagnosticsToTailorExperiences(&value)); return value; } template auto consume_Windows_System_UserProfile_IDiagnosticsSettings::User() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IDiagnosticsSettings)->get_User(&value)); return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IDiagnosticsSettingsStatics::GetDefault() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IDiagnosticsSettingsStatics)->GetDefault(&value)); return winrt::Windows::System::UserProfile::DiagnosticsSettings{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IDiagnosticsSettingsStatics::GetForUser(winrt::Windows::System::User const& user) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IDiagnosticsSettingsStatics)->GetForUser(*(void**)(&user), &value)); return winrt::Windows::System::UserProfile::DiagnosticsSettings{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IFirstSignInSettingsStatics::GetDefault() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IFirstSignInSettingsStatics)->GetDefault(&result)); return winrt::Windows::System::UserProfile::FirstSignInSettings{ result, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesForUser::User() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesForUser)->get_User(&value)); return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesForUser::Calendars() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesForUser)->get_Calendars(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesForUser::Clocks() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesForUser)->get_Clocks(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesForUser::Currencies() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesForUser)->get_Currencies(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesForUser::Languages() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesForUser)->get_Languages(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesForUser::HomeGeographicRegion() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesForUser)->get_HomeGeographicRegion(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesForUser::WeekStartsOn() const { winrt::Windows::Globalization::DayOfWeek value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesForUser)->get_WeekStartsOn(reinterpret_cast(&value))); return value; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesStatics::Calendars() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesStatics)->get_Calendars(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesStatics::Clocks() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesStatics)->get_Clocks(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesStatics::Currencies() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesStatics)->get_Currencies(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesStatics::Languages() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesStatics)->get_Languages(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesStatics::HomeGeographicRegion() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesStatics)->get_HomeGeographicRegion(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesStatics::WeekStartsOn() const { winrt::Windows::Globalization::DayOfWeek value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesStatics)->get_WeekStartsOn(reinterpret_cast(&value))); return value; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesStatics2::TrySetHomeGeographicRegion(param::hstring const& region) const { bool result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesStatics2)->TrySetHomeGeographicRegion(*(void**)(®ion), &result)); return result; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesStatics2::TrySetLanguages(param::iterable const& languageTags) const { bool result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesStatics2)->TrySetLanguages(*(void**)(&languageTags), &result)); return result; } template auto consume_Windows_System_UserProfile_IGlobalizationPreferencesStatics3::GetForUser(winrt::Windows::System::User const& user) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IGlobalizationPreferencesStatics3)->GetForUser(*(void**)(&user), &value)); return winrt::Windows::System::UserProfile::GlobalizationPreferencesForUser{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_ILockScreenImageFeedStatics::RequestSetImageFeedAsync(winrt::Windows::Foundation::Uri const& syndicationFeedUri) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::ILockScreenImageFeedStatics)->RequestSetImageFeedAsync(*(void**)(&syndicationFeedUri), &value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_ILockScreenImageFeedStatics::TryRemoveImageFeed() const { bool result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::ILockScreenImageFeedStatics)->TryRemoveImageFeed(&result)); return result; } template auto consume_Windows_System_UserProfile_ILockScreenStatics::OriginalImageFile() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::ILockScreenStatics)->get_OriginalImageFile(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_ILockScreenStatics::GetImageStream() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::ILockScreenStatics)->GetImageStream(&value)); return winrt::Windows::Storage::Streams::IRandomAccessStream{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_ILockScreenStatics::SetImageFileAsync(winrt::Windows::Storage::IStorageFile const& value) const { void* Operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::ILockScreenStatics)->SetImageFileAsync(*(void**)(&value), &Operation)); return winrt::Windows::Foundation::IAsyncAction{ Operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_ILockScreenStatics::SetImageStreamAsync(winrt::Windows::Storage::Streams::IRandomAccessStream const& value) const { void* Operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::ILockScreenStatics)->SetImageStreamAsync(*(void**)(&value), &Operation)); return winrt::Windows::Foundation::IAsyncAction{ Operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::AccountPictureChangeEnabled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->get_AccountPictureChangeEnabled(&value)); return value; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::NameAccessAllowed() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->get_NameAccessAllowed(&value)); return value; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::GetAccountPicture(winrt::Windows::System::UserProfile::AccountPictureKind const& kind) const { void* storageFile{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->GetAccountPicture(static_cast(kind), &storageFile)); return winrt::Windows::Storage::IStorageFile{ storageFile, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::SetAccountPictureAsync(winrt::Windows::Storage::IStorageFile const& image) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->SetAccountPictureAsync(*(void**)(&image), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::SetAccountPicturesAsync(winrt::Windows::Storage::IStorageFile const& smallImage, winrt::Windows::Storage::IStorageFile const& largeImage, winrt::Windows::Storage::IStorageFile const& video) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->SetAccountPicturesAsync(*(void**)(&smallImage), *(void**)(&largeImage), *(void**)(&video), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::SetAccountPictureFromStreamAsync(winrt::Windows::Storage::Streams::IRandomAccessStream const& image) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->SetAccountPictureFromStreamAsync(*(void**)(&image), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::SetAccountPicturesFromStreamsAsync(winrt::Windows::Storage::Streams::IRandomAccessStream const& smallImage, winrt::Windows::Storage::Streams::IRandomAccessStream const& largeImage, winrt::Windows::Storage::Streams::IRandomAccessStream const& video) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->SetAccountPicturesFromStreamsAsync(*(void**)(&smallImage), *(void**)(&largeImage), *(void**)(&video), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::AccountPictureChanged(winrt::Windows::Foundation::EventHandler const& changeHandler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->add_AccountPictureChanged(*(void**)(&changeHandler), put_abi(token))); return token; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::AccountPictureChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& changeHandler) const { return impl::make_event_revoker(this, AccountPictureChanged(changeHandler)); } template auto consume_Windows_System_UserProfile_IUserInformationStatics::AccountPictureChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->remove_AccountPictureChanged(impl::bind_in(token)); } template auto consume_Windows_System_UserProfile_IUserInformationStatics::GetDisplayNameAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->GetDisplayNameAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::GetFirstNameAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->GetFirstNameAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::GetLastNameAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->GetLastNameAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::GetPrincipalNameAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->GetPrincipalNameAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::GetSessionInitiationProtocolUriAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->GetSessionInitiationProtocolUriAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserInformationStatics::GetDomainNameAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserInformationStatics)->GetDomainNameAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserProfilePersonalizationSettings::TrySetLockScreenImageAsync(winrt::Windows::Storage::StorageFile const& imageFile) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserProfilePersonalizationSettings)->TrySetLockScreenImageAsync(*(void**)(&imageFile), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserProfilePersonalizationSettings::TrySetWallpaperImageAsync(winrt::Windows::Storage::StorageFile const& imageFile) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserProfilePersonalizationSettings)->TrySetWallpaperImageAsync(*(void**)(&imageFile), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserProfilePersonalizationSettingsStatics::Current() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserProfilePersonalizationSettingsStatics)->get_Current(&value)); return winrt::Windows::System::UserProfile::UserProfilePersonalizationSettings{ value, take_ownership_from_abi }; } template auto consume_Windows_System_UserProfile_IUserProfilePersonalizationSettingsStatics::IsSupported() const { bool result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::UserProfile::IUserProfilePersonalizationSettingsStatics)->IsSupported(&result)); return result; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AdvertisingId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AdvertisingId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_User(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = 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_AdvertisingId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AdvertisingId()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForUser(void* user, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetForUser(*reinterpret_cast(&user))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsSingleAppKioskMode(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSingleAppKioskMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_User(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = 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 GetDefault(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetForUser(void* user, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetForUser(*reinterpret_cast(&user))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CanUseDiagnosticsToTailorExperiences(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanUseDiagnosticsToTailorExperiences()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_User(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = 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 GetDefault(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetForUser(void* user, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetForUser(*reinterpret_cast(&user))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDefault(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_User(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().User()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Calendars(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Calendars()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Clocks(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Clocks()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Currencies(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Currencies()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Languages(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Languages()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HomeGeographicRegion(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HomeGeographicRegion()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WeekStartsOn(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WeekStartsOn()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Calendars(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Calendars()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Clocks(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Clocks()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Currencies(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Currencies()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Languages(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Languages()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HomeGeographicRegion(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HomeGeographicRegion()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WeekStartsOn(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WeekStartsOn()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TrySetHomeGeographicRegion(void* region, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TrySetHomeGeographicRegion(*reinterpret_cast(®ion))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TrySetLanguages(void* languageTags, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TrySetLanguages(*reinterpret_cast const*>(&languageTags))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForUser(void* user, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetForUser(*reinterpret_cast(&user))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RequestSetImageFeedAsync(void* syndicationFeedUri, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RequestSetImageFeedAsync(*reinterpret_cast(&syndicationFeedUri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryRemoveImageFeed(bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TryRemoveImageFeed()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_OriginalImageFile(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OriginalImageFile()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetImageStream(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetImageStream()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetImageFileAsync(void* value, void** Operation) noexcept final try { clear_abi(Operation); typename D::abi_guard guard(this->shim()); *Operation = detach_from(this->shim().SetImageFileAsync(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetImageStreamAsync(void* value, void** Operation) noexcept final try { clear_abi(Operation); typename D::abi_guard guard(this->shim()); *Operation = detach_from(this->shim().SetImageStreamAsync(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AccountPictureChangeEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AccountPictureChangeEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NameAccessAllowed(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NameAccessAllowed()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAccountPicture(int32_t kind, void** storageFile) noexcept final try { clear_abi(storageFile); typename D::abi_guard guard(this->shim()); *storageFile = detach_from(this->shim().GetAccountPicture(*reinterpret_cast(&kind))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetAccountPictureAsync(void* image, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SetAccountPictureAsync(*reinterpret_cast(&image))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetAccountPicturesAsync(void* smallImage, void* largeImage, void* video, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SetAccountPicturesAsync(*reinterpret_cast(&smallImage), *reinterpret_cast(&largeImage), *reinterpret_cast(&video))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetAccountPictureFromStreamAsync(void* image, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SetAccountPictureFromStreamAsync(*reinterpret_cast(&image))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetAccountPicturesFromStreamsAsync(void* smallImage, void* largeImage, void* video, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SetAccountPicturesFromStreamsAsync(*reinterpret_cast(&smallImage), *reinterpret_cast(&largeImage), *reinterpret_cast(&video))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_AccountPictureChanged(void* changeHandler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AccountPictureChanged(*reinterpret_cast const*>(&changeHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AccountPictureChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AccountPictureChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall GetDisplayNameAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetDisplayNameAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFirstNameAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetFirstNameAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetLastNameAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetLastNameAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPrincipalNameAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetPrincipalNameAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetSessionInitiationProtocolUriAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetSessionInitiationProtocolUriAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDomainNameAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetDomainNameAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TrySetLockScreenImageAsync(void* imageFile, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().TrySetLockScreenImageAsync(*reinterpret_cast(&imageFile))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TrySetWallpaperImageAsync(void* imageFile, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().TrySetWallpaperImageAsync(*reinterpret_cast(&imageFile))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Current(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Current()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsSupported(bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::System::UserProfile { inline auto AdvertisingManager::AdvertisingId() { return impl::call_factory_cast([](IAdvertisingManagerStatics const& f) { return f.AdvertisingId(); }); } inline auto AdvertisingManager::GetForUser(winrt::Windows::System::User const& user) { return impl::call_factory([&](IAdvertisingManagerStatics2 const& f) { return f.GetForUser(user); }); } inline auto AssignedAccessSettings::GetDefault() { return impl::call_factory_cast([](IAssignedAccessSettingsStatics const& f) { return f.GetDefault(); }); } inline auto AssignedAccessSettings::GetForUser(winrt::Windows::System::User const& user) { return impl::call_factory([&](IAssignedAccessSettingsStatics const& f) { return f.GetForUser(user); }); } inline auto DiagnosticsSettings::GetDefault() { return impl::call_factory_cast([](IDiagnosticsSettingsStatics const& f) { return f.GetDefault(); }); } inline auto DiagnosticsSettings::GetForUser(winrt::Windows::System::User const& user) { return impl::call_factory([&](IDiagnosticsSettingsStatics const& f) { return f.GetForUser(user); }); } inline auto FirstSignInSettings::GetDefault() { return impl::call_factory_cast([](IFirstSignInSettingsStatics const& f) { return f.GetDefault(); }); } inline auto GlobalizationPreferences::Calendars() { return impl::call_factory_cast(*)(IGlobalizationPreferencesStatics const&), GlobalizationPreferences, IGlobalizationPreferencesStatics>([](IGlobalizationPreferencesStatics const& f) { return f.Calendars(); }); } inline auto GlobalizationPreferences::Clocks() { return impl::call_factory_cast(*)(IGlobalizationPreferencesStatics const&), GlobalizationPreferences, IGlobalizationPreferencesStatics>([](IGlobalizationPreferencesStatics const& f) { return f.Clocks(); }); } inline auto GlobalizationPreferences::Currencies() { return impl::call_factory_cast(*)(IGlobalizationPreferencesStatics const&), GlobalizationPreferences, IGlobalizationPreferencesStatics>([](IGlobalizationPreferencesStatics const& f) { return f.Currencies(); }); } inline auto GlobalizationPreferences::Languages() { return impl::call_factory_cast(*)(IGlobalizationPreferencesStatics const&), GlobalizationPreferences, IGlobalizationPreferencesStatics>([](IGlobalizationPreferencesStatics const& f) { return f.Languages(); }); } inline auto GlobalizationPreferences::HomeGeographicRegion() { return impl::call_factory_cast([](IGlobalizationPreferencesStatics const& f) { return f.HomeGeographicRegion(); }); } inline auto GlobalizationPreferences::WeekStartsOn() { return impl::call_factory_cast([](IGlobalizationPreferencesStatics const& f) { return f.WeekStartsOn(); }); } inline auto GlobalizationPreferences::TrySetHomeGeographicRegion(param::hstring const& region) { return impl::call_factory([&](IGlobalizationPreferencesStatics2 const& f) { return f.TrySetHomeGeographicRegion(region); }); } inline auto GlobalizationPreferences::TrySetLanguages(param::iterable const& languageTags) { return impl::call_factory([&](IGlobalizationPreferencesStatics2 const& f) { return f.TrySetLanguages(languageTags); }); } inline auto GlobalizationPreferences::GetForUser(winrt::Windows::System::User const& user) { return impl::call_factory([&](IGlobalizationPreferencesStatics3 const& f) { return f.GetForUser(user); }); } inline auto LockScreen::RequestSetImageFeedAsync(winrt::Windows::Foundation::Uri const& syndicationFeedUri) { return impl::call_factory([&](ILockScreenImageFeedStatics const& f) { return f.RequestSetImageFeedAsync(syndicationFeedUri); }); } inline auto LockScreen::TryRemoveImageFeed() { return impl::call_factory_cast([](ILockScreenImageFeedStatics const& f) { return f.TryRemoveImageFeed(); }); } inline auto LockScreen::OriginalImageFile() { return impl::call_factory_cast([](ILockScreenStatics const& f) { return f.OriginalImageFile(); }); } inline auto LockScreen::GetImageStream() { return impl::call_factory_cast([](ILockScreenStatics const& f) { return f.GetImageStream(); }); } inline auto LockScreen::SetImageFileAsync(winrt::Windows::Storage::IStorageFile const& value) { return impl::call_factory([&](ILockScreenStatics const& f) { return f.SetImageFileAsync(value); }); } inline auto LockScreen::SetImageStreamAsync(winrt::Windows::Storage::Streams::IRandomAccessStream const& value) { return impl::call_factory([&](ILockScreenStatics const& f) { return f.SetImageStreamAsync(value); }); } inline auto UserInformation::AccountPictureChangeEnabled() { return impl::call_factory_cast([](IUserInformationStatics const& f) { return f.AccountPictureChangeEnabled(); }); } inline auto UserInformation::NameAccessAllowed() { return impl::call_factory_cast([](IUserInformationStatics const& f) { return f.NameAccessAllowed(); }); } inline auto UserInformation::GetAccountPicture(winrt::Windows::System::UserProfile::AccountPictureKind const& kind) { return impl::call_factory([&](IUserInformationStatics const& f) { return f.GetAccountPicture(kind); }); } inline auto UserInformation::SetAccountPictureAsync(winrt::Windows::Storage::IStorageFile const& image) { return impl::call_factory([&](IUserInformationStatics const& f) { return f.SetAccountPictureAsync(image); }); } inline auto UserInformation::SetAccountPicturesAsync(winrt::Windows::Storage::IStorageFile const& smallImage, winrt::Windows::Storage::IStorageFile const& largeImage, winrt::Windows::Storage::IStorageFile const& video) { return impl::call_factory([&](IUserInformationStatics const& f) { return f.SetAccountPicturesAsync(smallImage, largeImage, video); }); } inline auto UserInformation::SetAccountPictureFromStreamAsync(winrt::Windows::Storage::Streams::IRandomAccessStream const& image) { return impl::call_factory([&](IUserInformationStatics const& f) { return f.SetAccountPictureFromStreamAsync(image); }); } inline auto UserInformation::SetAccountPicturesFromStreamsAsync(winrt::Windows::Storage::Streams::IRandomAccessStream const& smallImage, winrt::Windows::Storage::Streams::IRandomAccessStream const& largeImage, winrt::Windows::Storage::Streams::IRandomAccessStream const& video) { return impl::call_factory([&](IUserInformationStatics const& f) { return f.SetAccountPicturesFromStreamsAsync(smallImage, largeImage, video); }); } inline auto UserInformation::AccountPictureChanged(winrt::Windows::Foundation::EventHandler const& changeHandler) { return impl::call_factory([&](IUserInformationStatics const& f) { return f.AccountPictureChanged(changeHandler); }); } inline auto UserInformation::AccountPictureChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& changeHandler) { auto f = get_activation_factory(); return UserInformation::AccountPictureChanged_revoker{ f, f.AccountPictureChanged(changeHandler) }; } inline auto UserInformation::AccountPictureChanged(winrt::event_token const& token) { impl::call_factory([&](IUserInformationStatics const& f) { return f.AccountPictureChanged(token); }); } inline auto UserInformation::GetDisplayNameAsync() { return impl::call_factory_cast(*)(IUserInformationStatics const&), UserInformation, IUserInformationStatics>([](IUserInformationStatics const& f) { return f.GetDisplayNameAsync(); }); } inline auto UserInformation::GetFirstNameAsync() { return impl::call_factory_cast(*)(IUserInformationStatics const&), UserInformation, IUserInformationStatics>([](IUserInformationStatics const& f) { return f.GetFirstNameAsync(); }); } inline auto UserInformation::GetLastNameAsync() { return impl::call_factory_cast(*)(IUserInformationStatics const&), UserInformation, IUserInformationStatics>([](IUserInformationStatics const& f) { return f.GetLastNameAsync(); }); } inline auto UserInformation::GetPrincipalNameAsync() { return impl::call_factory_cast(*)(IUserInformationStatics const&), UserInformation, IUserInformationStatics>([](IUserInformationStatics const& f) { return f.GetPrincipalNameAsync(); }); } inline auto UserInformation::GetSessionInitiationProtocolUriAsync() { return impl::call_factory_cast(*)(IUserInformationStatics const&), UserInformation, IUserInformationStatics>([](IUserInformationStatics const& f) { return f.GetSessionInitiationProtocolUriAsync(); }); } inline auto UserInformation::GetDomainNameAsync() { return impl::call_factory_cast(*)(IUserInformationStatics const&), UserInformation, IUserInformationStatics>([](IUserInformationStatics const& f) { return f.GetDomainNameAsync(); }); } inline auto UserProfilePersonalizationSettings::Current() { return impl::call_factory_cast([](IUserProfilePersonalizationSettingsStatics const& f) { return f.Current(); }); } inline auto UserProfilePersonalizationSettings::IsSupported() { return impl::call_factory_cast([](IUserProfilePersonalizationSettingsStatics const& f) { return f.IsSupported(); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif