// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_System_Diagnostics_H #define WINRT_Windows_System_Diagnostics_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.Data.Json.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.System.2.h" #include "winrt/impl/Windows.System.Diagnostics.2.h" namespace winrt::impl { template auto consume_Windows_System_Diagnostics_IDiagnosticActionResult::ExtendedError() const { winrt::hresult value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IDiagnosticActionResult)->get_ExtendedError(put_abi(value))); return value; } template auto consume_Windows_System_Diagnostics_IDiagnosticActionResult::Results() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IDiagnosticActionResult)->get_Results(&value)); return winrt::Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IDiagnosticInvoker::RunDiagnosticActionAsync(winrt::Windows::Data::Json::JsonObject const& context) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IDiagnosticInvoker)->RunDiagnosticActionAsync(*(void**)(&context), &operation)); return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IDiagnosticInvoker2::RunDiagnosticActionFromStringAsync(param::hstring const& context) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IDiagnosticInvoker2)->RunDiagnosticActionFromStringAsync(*(void**)(&context), &operation)); return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IDiagnosticInvokerStatics::GetDefault() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IDiagnosticInvokerStatics)->GetDefault(&result)); return winrt::Windows::System::Diagnostics::DiagnosticInvoker{ result, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IDiagnosticInvokerStatics::GetForUser(winrt::Windows::System::User const& user) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IDiagnosticInvokerStatics)->GetForUser(*(void**)(&user), &result)); return winrt::Windows::System::Diagnostics::DiagnosticInvoker{ result, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IDiagnosticInvokerStatics::IsSupported() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IDiagnosticInvokerStatics)->get_IsSupported(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessCpuUsage::GetReport() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessCpuUsage)->GetReport(&value)); return winrt::Windows::System::Diagnostics::ProcessCpuUsageReport{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IProcessCpuUsageReport::KernelTime() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessCpuUsageReport)->get_KernelTime(put_abi(value))); return value; } template auto consume_Windows_System_Diagnostics_IProcessCpuUsageReport::UserTime() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessCpuUsageReport)->get_UserTime(put_abi(value))); return value; } template auto consume_Windows_System_Diagnostics_IProcessDiagnosticInfo::ProcessId() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiagnosticInfo)->get_ProcessId(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessDiagnosticInfo::ExecutableFileName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiagnosticInfo)->get_ExecutableFileName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IProcessDiagnosticInfo::Parent() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiagnosticInfo)->get_Parent(&value)); return winrt::Windows::System::Diagnostics::ProcessDiagnosticInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IProcessDiagnosticInfo::ProcessStartTime() const { winrt::Windows::Foundation::DateTime value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiagnosticInfo)->get_ProcessStartTime(put_abi(value))); return value; } template auto consume_Windows_System_Diagnostics_IProcessDiagnosticInfo::DiskUsage() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiagnosticInfo)->get_DiskUsage(&value)); return winrt::Windows::System::Diagnostics::ProcessDiskUsage{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IProcessDiagnosticInfo::MemoryUsage() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiagnosticInfo)->get_MemoryUsage(&value)); return winrt::Windows::System::Diagnostics::ProcessMemoryUsage{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IProcessDiagnosticInfo::CpuUsage() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiagnosticInfo)->get_CpuUsage(&value)); return winrt::Windows::System::Diagnostics::ProcessCpuUsage{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IProcessDiagnosticInfo2::GetAppDiagnosticInfos() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiagnosticInfo2)->GetAppDiagnosticInfos(&result)); return winrt::Windows::Foundation::Collections::IVector{ result, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IProcessDiagnosticInfo2::IsPackaged() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiagnosticInfo2)->get_IsPackaged(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessDiagnosticInfoStatics::GetForProcesses() const { void* processes{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiagnosticInfoStatics)->GetForProcesses(&processes)); return winrt::Windows::Foundation::Collections::IVectorView{ processes, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IProcessDiagnosticInfoStatics::GetForCurrentProcess() const { void* processes{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiagnosticInfoStatics)->GetForCurrentProcess(&processes)); return winrt::Windows::System::Diagnostics::ProcessDiagnosticInfo{ processes, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IProcessDiagnosticInfoStatics2::TryGetForProcessId(uint32_t processId) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiagnosticInfoStatics2)->TryGetForProcessId(processId, &result)); return winrt::Windows::System::Diagnostics::ProcessDiagnosticInfo{ result, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IProcessDiskUsage::GetReport() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiskUsage)->GetReport(&value)); return winrt::Windows::System::Diagnostics::ProcessDiskUsageReport{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IProcessDiskUsageReport::ReadOperationCount() const { int64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiskUsageReport)->get_ReadOperationCount(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessDiskUsageReport::WriteOperationCount() const { int64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiskUsageReport)->get_WriteOperationCount(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessDiskUsageReport::OtherOperationCount() const { int64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiskUsageReport)->get_OtherOperationCount(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessDiskUsageReport::BytesReadCount() const { int64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiskUsageReport)->get_BytesReadCount(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessDiskUsageReport::BytesWrittenCount() const { int64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiskUsageReport)->get_BytesWrittenCount(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessDiskUsageReport::OtherBytesCount() const { int64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessDiskUsageReport)->get_OtherBytesCount(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsage::GetReport() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsage)->GetReport(&value)); return winrt::Windows::System::Diagnostics::ProcessMemoryUsageReport{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsageReport::NonPagedPoolSizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport)->get_NonPagedPoolSizeInBytes(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsageReport::PageFaultCount() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport)->get_PageFaultCount(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsageReport::PageFileSizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport)->get_PageFileSizeInBytes(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsageReport::PagedPoolSizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport)->get_PagedPoolSizeInBytes(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsageReport::PeakNonPagedPoolSizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport)->get_PeakNonPagedPoolSizeInBytes(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsageReport::PeakPageFileSizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport)->get_PeakPageFileSizeInBytes(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsageReport::PeakPagedPoolSizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport)->get_PeakPagedPoolSizeInBytes(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsageReport::PeakVirtualMemorySizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport)->get_PeakVirtualMemorySizeInBytes(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsageReport::PeakWorkingSetSizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport)->get_PeakWorkingSetSizeInBytes(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsageReport::PrivatePageCount() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport)->get_PrivatePageCount(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsageReport::VirtualMemorySizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport)->get_VirtualMemorySizeInBytes(&value)); return value; } template auto consume_Windows_System_Diagnostics_IProcessMemoryUsageReport::WorkingSetSizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::IProcessMemoryUsageReport)->get_WorkingSetSizeInBytes(&value)); return value; } template auto consume_Windows_System_Diagnostics_ISystemCpuUsage::GetReport() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemCpuUsage)->GetReport(&value)); return winrt::Windows::System::Diagnostics::SystemCpuUsageReport{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_ISystemCpuUsageReport::KernelTime() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemCpuUsageReport)->get_KernelTime(put_abi(value))); return value; } template auto consume_Windows_System_Diagnostics_ISystemCpuUsageReport::UserTime() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemCpuUsageReport)->get_UserTime(put_abi(value))); return value; } template auto consume_Windows_System_Diagnostics_ISystemCpuUsageReport::IdleTime() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemCpuUsageReport)->get_IdleTime(put_abi(value))); return value; } template auto consume_Windows_System_Diagnostics_ISystemDiagnosticInfo::MemoryUsage() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemDiagnosticInfo)->get_MemoryUsage(&value)); return winrt::Windows::System::Diagnostics::SystemMemoryUsage{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_ISystemDiagnosticInfo::CpuUsage() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemDiagnosticInfo)->get_CpuUsage(&value)); return winrt::Windows::System::Diagnostics::SystemCpuUsage{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_ISystemDiagnosticInfoStatics::GetForCurrentSystem() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemDiagnosticInfoStatics)->GetForCurrentSystem(&value)); return winrt::Windows::System::Diagnostics::SystemDiagnosticInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_ISystemDiagnosticInfoStatics2::IsArchitectureSupported(winrt::Windows::System::ProcessorArchitecture const& type) const { bool result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemDiagnosticInfoStatics2)->IsArchitectureSupported(static_cast(type), &result)); return result; } template auto consume_Windows_System_Diagnostics_ISystemDiagnosticInfoStatics2::PreferredArchitecture() const { winrt::Windows::System::ProcessorArchitecture value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemDiagnosticInfoStatics2)->get_PreferredArchitecture(reinterpret_cast(&value))); return value; } template auto consume_Windows_System_Diagnostics_ISystemMemoryUsage::GetReport() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemMemoryUsage)->GetReport(&value)); return winrt::Windows::System::Diagnostics::SystemMemoryUsageReport{ value, take_ownership_from_abi }; } template auto consume_Windows_System_Diagnostics_ISystemMemoryUsageReport::TotalPhysicalSizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemMemoryUsageReport)->get_TotalPhysicalSizeInBytes(&value)); return value; } template auto consume_Windows_System_Diagnostics_ISystemMemoryUsageReport::AvailableSizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemMemoryUsageReport)->get_AvailableSizeInBytes(&value)); return value; } template auto consume_Windows_System_Diagnostics_ISystemMemoryUsageReport::CommittedSizeInBytes() const { uint64_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::Diagnostics::ISystemMemoryUsageReport)->get_CommittedSizeInBytes(&value)); return value; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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_Results(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Results()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RunDiagnosticActionAsync(void* context, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RunDiagnosticActionAsync(*reinterpret_cast(&context))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RunDiagnosticActionFromStringAsync(void* context, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RunDiagnosticActionFromStringAsync(*reinterpret_cast(&context))); 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(); } int32_t __stdcall get_IsSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetReport(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetReport()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_KernelTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().KernelTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UserTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UserTime()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ProcessId(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProcessId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExecutableFileName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExecutableFileName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Parent(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Parent()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProcessStartTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProcessStartTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DiskUsage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DiskUsage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MemoryUsage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MemoryUsage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CpuUsage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CpuUsage()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAppDiagnosticInfos(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAppDiagnosticInfos()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPackaged(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPackaged()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForProcesses(void** processes) noexcept final try { clear_abi(processes); typename D::abi_guard guard(this->shim()); *processes = detach_from>(this->shim().GetForProcesses()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetForCurrentProcess(void** processes) noexcept final try { clear_abi(processes); typename D::abi_guard guard(this->shim()); *processes = detach_from(this->shim().GetForCurrentProcess()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryGetForProcessId(uint32_t processId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TryGetForProcessId(processId)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetReport(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetReport()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ReadOperationCount(int64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReadOperationCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WriteOperationCount(int64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WriteOperationCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OtherOperationCount(int64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OtherOperationCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BytesReadCount(int64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BytesReadCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BytesWrittenCount(int64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BytesWrittenCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OtherBytesCount(int64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OtherBytesCount()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetReport(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetReport()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_NonPagedPoolSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NonPagedPoolSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PageFaultCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PageFaultCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PageFileSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PageFileSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PagedPoolSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PagedPoolSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PeakNonPagedPoolSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PeakNonPagedPoolSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PeakPageFileSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PeakPageFileSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PeakPagedPoolSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PeakPagedPoolSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PeakVirtualMemorySizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PeakVirtualMemorySizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PeakWorkingSetSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PeakWorkingSetSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrivatePageCount(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrivatePageCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VirtualMemorySizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VirtualMemorySizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WorkingSetSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WorkingSetSizeInBytes()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetReport(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetReport()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_KernelTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().KernelTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UserTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UserTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IdleTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IdleTime()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MemoryUsage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MemoryUsage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CpuUsage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CpuUsage()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentSystem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetForCurrentSystem()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsArchitectureSupported(int32_t type, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsArchitectureSupported(*reinterpret_cast(&type))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PreferredArchitecture(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PreferredArchitecture()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetReport(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetReport()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_TotalPhysicalSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TotalPhysicalSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AvailableSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AvailableSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CommittedSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CommittedSizeInBytes()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::System::Diagnostics { inline auto DiagnosticInvoker::GetDefault() { return impl::call_factory_cast([](IDiagnosticInvokerStatics const& f) { return f.GetDefault(); }); } inline auto DiagnosticInvoker::GetForUser(winrt::Windows::System::User const& user) { return impl::call_factory([&](IDiagnosticInvokerStatics const& f) { return f.GetForUser(user); }); } inline auto DiagnosticInvoker::IsSupported() { return impl::call_factory_cast([](IDiagnosticInvokerStatics const& f) { return f.IsSupported(); }); } inline auto ProcessDiagnosticInfo::GetForProcesses() { return impl::call_factory_cast(*)(IProcessDiagnosticInfoStatics const&), ProcessDiagnosticInfo, IProcessDiagnosticInfoStatics>([](IProcessDiagnosticInfoStatics const& f) { return f.GetForProcesses(); }); } inline auto ProcessDiagnosticInfo::GetForCurrentProcess() { return impl::call_factory_cast([](IProcessDiagnosticInfoStatics const& f) { return f.GetForCurrentProcess(); }); } inline auto ProcessDiagnosticInfo::TryGetForProcessId(uint32_t processId) { return impl::call_factory([&](IProcessDiagnosticInfoStatics2 const& f) { return f.TryGetForProcessId(processId); }); } inline auto SystemDiagnosticInfo::GetForCurrentSystem() { return impl::call_factory_cast([](ISystemDiagnosticInfoStatics const& f) { return f.GetForCurrentSystem(); }); } inline auto SystemDiagnosticInfo::IsArchitectureSupported(winrt::Windows::System::ProcessorArchitecture const& type) { return impl::call_factory([&](ISystemDiagnosticInfoStatics2 const& f) { return f.IsArchitectureSupported(type); }); } inline auto SystemDiagnosticInfo::PreferredArchitecture() { return impl::call_factory_cast([](ISystemDiagnosticInfoStatics2 const& f) { return f.PreferredArchitecture(); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif