// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Management_H #define WINRT_Windows_Management_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.Management.2.h" namespace winrt::impl { template auto consume_Windows_Management_IMdmAlert::Data() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->get_Data(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Management_IMdmAlert::Data(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->put_Data(*(void**)(&value))); } template auto consume_Windows_Management_IMdmAlert::Format() const { winrt::Windows::Management::MdmAlertDataType value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->get_Format(reinterpret_cast(&value))); return value; } template auto consume_Windows_Management_IMdmAlert::Format(winrt::Windows::Management::MdmAlertDataType const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->put_Format(static_cast(value))); } template auto consume_Windows_Management_IMdmAlert::Mark() const { winrt::Windows::Management::MdmAlertMark value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->get_Mark(reinterpret_cast(&value))); return value; } template auto consume_Windows_Management_IMdmAlert::Mark(winrt::Windows::Management::MdmAlertMark const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->put_Mark(static_cast(value))); } template auto consume_Windows_Management_IMdmAlert::Source() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->get_Source(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Management_IMdmAlert::Source(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->put_Source(*(void**)(&value))); } template auto consume_Windows_Management_IMdmAlert::Status() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->get_Status(&value)); return value; } template auto consume_Windows_Management_IMdmAlert::Target() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->get_Target(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Management_IMdmAlert::Target(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->put_Target(*(void**)(&value))); } template auto consume_Windows_Management_IMdmAlert::Type() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->get_Type(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Management_IMdmAlert::Type(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmAlert)->put_Type(*(void**)(&value))); } template auto consume_Windows_Management_IMdmSession::Alerts() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmSession)->get_Alerts(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Management_IMdmSession::ExtendedError() const { winrt::hresult value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmSession)->get_ExtendedError(put_abi(value))); return value; } template auto consume_Windows_Management_IMdmSession::Id() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmSession)->get_Id(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Management_IMdmSession::State() const { winrt::Windows::Management::MdmSessionState value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmSession)->get_State(reinterpret_cast(&value))); return value; } template auto consume_Windows_Management_IMdmSession::AttachAsync() const { void* action{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmSession)->AttachAsync(&action)); return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi }; } template auto consume_Windows_Management_IMdmSession::Delete() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmSession)->Delete()); } template auto consume_Windows_Management_IMdmSession::StartAsync() const { void* action{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmSession)->StartAsync(&action)); return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi }; } template auto consume_Windows_Management_IMdmSession::StartAsync(param::async_iterable const& alerts) const { void* action{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmSession)->StartWithAlertsAsync(*(void**)(&alerts), &action)); return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi }; } template auto consume_Windows_Management_IMdmSessionManagerStatics::SessionIds() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmSessionManagerStatics)->get_SessionIds(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Management_IMdmSessionManagerStatics::TryCreateSession() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmSessionManagerStatics)->TryCreateSession(&result)); return winrt::Windows::Management::MdmSession{ result, take_ownership_from_abi }; } template auto consume_Windows_Management_IMdmSessionManagerStatics::DeleteSessionById(param::hstring const& sessionId) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmSessionManagerStatics)->DeleteSessionById(*(void**)(&sessionId))); } template auto consume_Windows_Management_IMdmSessionManagerStatics::GetSessionById(param::hstring const& sessionId) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::IMdmSessionManagerStatics)->GetSessionById(*(void**)(&sessionId), &result)); return winrt::Windows::Management::MdmSession{ result, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Data(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Data()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Data(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Data(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Format(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Format()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Format(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Format(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Mark(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Mark()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Mark(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Mark(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Source(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Source()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Source(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Source(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Status(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Target(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Target()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Target(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Target(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Type(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Type()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Type(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Type(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Alerts(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Alerts()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedError()); return 0; } catch (...) { return to_hresult(); } 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_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(); } int32_t __stdcall AttachAsync(void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().AttachAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Delete() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Delete(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StartAsync(void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().StartAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StartWithAlertsAsync(void* alerts, void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().StartAsync(*reinterpret_cast const*>(&alerts))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SessionIds(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SessionIds()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryCreateSession(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TryCreateSession()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DeleteSessionById(void* sessionId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DeleteSessionById(*reinterpret_cast(&sessionId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetSessionById(void* sessionId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetSessionById(*reinterpret_cast(&sessionId))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Management { inline MdmAlert::MdmAlert() : MdmAlert(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto MdmSessionManager::SessionIds() { return impl::call_factory_cast(*)(IMdmSessionManagerStatics const&), MdmSessionManager, IMdmSessionManagerStatics>([](IMdmSessionManagerStatics const& f) { return f.SessionIds(); }); } inline auto MdmSessionManager::TryCreateSession() { return impl::call_factory_cast([](IMdmSessionManagerStatics const& f) { return f.TryCreateSession(); }); } inline auto MdmSessionManager::DeleteSessionById(param::hstring const& sessionId) { impl::call_factory([&](IMdmSessionManagerStatics const& f) { return f.DeleteSessionById(sessionId); }); } inline auto MdmSessionManager::GetSessionById(param::hstring const& sessionId) { return impl::call_factory([&](IMdmSessionManagerStatics const& f) { return f.GetSessionById(sessionId); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif