// C++/WinRT v3.0.260818.1

// SPDX-License-Identifier: MIT OR Apache-2.0
// SPDX-FileCopyrightText: Copyright (c) Microsoft Corporation
//
// Generated using .winmd files from https://github.com/microsoft/windows-rs
//

#pragma once
#ifndef WINRT_Windows_Devices_HumanInterfaceDevice_H
#define WINRT_Windows_Devices_HumanInterfaceDevice_H
#ifndef WINRT_IMPORT_MODULE

#ifndef WINRT_IMPL_BUILD_MODULE
#include "winrt/base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "3.0.260818.1"), "Mismatched C++/WinRT headers.");
#define CPPWINRT_VERSION "3.0.260818.1"
#include "winrt/Windows.Devices.h"
#include "winrt/impl/Windows.Foundation.2.h"
#include "winrt/impl/Windows.Foundation.Collections.2.h"
#include "winrt/impl/Windows.Storage.2.h"
#include "winrt/impl/Windows.Storage.Streams.2.h"
#include "winrt/impl/Windows.Devices.HumanInterfaceDevice.2.h"
#endif // WINRT_IMPL_BUILD_MODULE
WINRT_EXPORT namespace winrt::impl
{
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControl<D>::Id() const
    {
        std::uint32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl>::get_Id, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControl<D>::UsagePage() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl>::get_UsagePage, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControl<D>::UsageId() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl>::get_UsageId, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControl<D>::IsActive() const
    {
        bool value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl>::get_IsActive, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControl<D>::IsActive(bool value) const
    {
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl>::put_IsActive, value);
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControl<D>::ControlDescription() const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl>::get_ControlDescription, &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControlDescription<D>::Id() const
    {
        std::uint32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription>::get_Id, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControlDescription<D>::ReportId() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription>::get_ReportId, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControlDescription<D>::ReportType() const
    {
        winrt::Windows::Devices::HumanInterfaceDevice::HidReportType value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription>::get_ReportType, reinterpret_cast<std::int32_t*>(&value));
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControlDescription<D>::UsagePage() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription>::get_UsagePage, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControlDescription<D>::UsageId() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription>::get_UsageId, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControlDescription<D>::ParentCollections() const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription>::get_ParentCollections, &value);
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::HumanInterfaceDevice::HidCollection>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidBooleanControlDescription2<D>::IsAbsolute() const
    {
        bool value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription2, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription2>::get_IsAbsolute, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidCollection<D>::Id() const
    {
        std::uint32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidCollection, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidCollection>::get_Id, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidCollection<D>::Type() const
    {
        winrt::Windows::Devices::HumanInterfaceDevice::HidCollectionType value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidCollection, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidCollection>::get_Type, reinterpret_cast<std::int32_t*>(&value));
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidCollection<D>::UsagePage() const
    {
        std::uint32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidCollection, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidCollection>::get_UsagePage, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidCollection<D>::UsageId() const
    {
        std::uint32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidCollection, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidCollection>::get_UsageId, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::VendorId() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::get_VendorId, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::ProductId() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::get_ProductId, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::Version() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::get_Version, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::UsagePage() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::get_UsagePage, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::UsageId() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::get_UsageId, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::GetInputReportAsync() const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::GetInputReportAsync, &value);
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Devices::HumanInterfaceDevice::HidInputReport>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::GetInputReportAsync(std::uint16_t reportId) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::GetInputReportByIdAsync, reportId, &value);
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Devices::HumanInterfaceDevice::HidInputReport>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::GetFeatureReportAsync() const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::GetFeatureReportAsync, &value);
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Devices::HumanInterfaceDevice::HidFeatureReport>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::GetFeatureReportAsync(std::uint16_t reportId) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::GetFeatureReportByIdAsync, reportId, &value);
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Devices::HumanInterfaceDevice::HidFeatureReport>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::CreateOutputReport() const
    {
        void* outputReport{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::CreateOutputReport, &outputReport);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidOutputReport{ outputReport, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::CreateOutputReport(std::uint16_t reportId) const
    {
        void* outputReport{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::CreateOutputReportById, reportId, &outputReport);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidOutputReport{ outputReport, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::CreateFeatureReport() const
    {
        void* featureReport{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::CreateFeatureReport, &featureReport);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidFeatureReport{ featureReport, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::CreateFeatureReport(std::uint16_t reportId) const
    {
        void* featureReport{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::CreateFeatureReportById, reportId, &featureReport);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidFeatureReport{ featureReport, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::SendOutputReportAsync(winrt::Windows::Devices::HumanInterfaceDevice::HidOutputReport const& outputReport) const
    {
        void* operation{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::SendOutputReportAsync, *(void**)(&outputReport), &operation);
        return winrt::Windows::Foundation::IAsyncOperation<std::uint32_t>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::SendFeatureReportAsync(winrt::Windows::Devices::HumanInterfaceDevice::HidFeatureReport const& featureReport) const
    {
        void* operation{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::SendFeatureReportAsync, *(void**)(&featureReport), &operation);
        return winrt::Windows::Foundation::IAsyncOperation<std::uint32_t>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::GetBooleanControlDescriptions(winrt::Windows::Devices::HumanInterfaceDevice::HidReportType const& reportType, std::uint16_t usagePage, std::uint16_t usageId) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::GetBooleanControlDescriptions, static_cast<std::int32_t>(reportType), usagePage, usageId, &value);
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::GetNumericControlDescriptions(winrt::Windows::Devices::HumanInterfaceDevice::HidReportType const& reportType, std::uint16_t usagePage, std::uint16_t usageId) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::GetNumericControlDescriptions, static_cast<std::int32_t>(reportType), usagePage, usageId, &value);
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::InputReportReceived(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Devices::HumanInterfaceDevice::HidDevice, winrt::Windows::Devices::HumanInterfaceDevice::HidInputReportReceivedEventArgs> const& reportHandler) const
    {
        winrt::event_token token{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::add_InputReportReceived, *(void**)(&reportHandler), put_abi(token));
        return token;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::InputReportReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Devices::HumanInterfaceDevice::HidDevice, winrt::Windows::Devices::HumanInterfaceDevice::HidInputReportReceivedEventArgs> const& reportHandler) const
    {
        return impl::make_event_revoker<D, InputReportReceived_revoker>(this, InputReportReceived(reportHandler));
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDevice<D>::InputReportReceived(winrt::event_token const& token) const noexcept
    {
        consume_noexcept_remove_overload<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>::remove_InputReportReceived, impl::bind_in(token));
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDeviceStatics<D>::GetDeviceSelector(std::uint16_t usagePage, std::uint16_t usageId) const
    {
        void* selector{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDeviceStatics, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDeviceStatics>::GetDeviceSelector, usagePage, usageId, &selector);
        return hstring{ selector, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDeviceStatics<D>::GetDeviceSelector(std::uint16_t usagePage, std::uint16_t usageId, std::uint16_t vendorId, std::uint16_t productId) const
    {
        void* selector{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDeviceStatics, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDeviceStatics>::GetDeviceSelectorVidPid, usagePage, usageId, vendorId, productId, &selector);
        return hstring{ selector, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidDeviceStatics<D>::FromIdAsync(param::hstring const& deviceId, winrt::Windows::Storage::FileAccessMode const& accessMode) const
    {
        void* hidDevice{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidDeviceStatics, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidDeviceStatics>::FromIdAsync, *(void**)(&deviceId), static_cast<std::int32_t>(accessMode), &hidDevice);
        return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Devices::HumanInterfaceDevice::HidDevice>{ hidDevice, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidFeatureReport<D>::Id() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport>::get_Id, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidFeatureReport<D>::Data() const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport>::get_Data, &value);
        return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidFeatureReport<D>::Data(winrt::Windows::Storage::Streams::IBuffer const& value) const
    {
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport>::put_Data, *(void**)(&value));
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidFeatureReport<D>::GetBooleanControl(std::uint16_t usagePage, std::uint16_t usageId) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport>::GetBooleanControl, usagePage, usageId, &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidFeatureReport<D>::GetBooleanControlByDescription(winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription const& controlDescription) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport>::GetBooleanControlByDescription, *(void**)(&controlDescription), &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidFeatureReport<D>::GetNumericControl(std::uint16_t usagePage, std::uint16_t usageId) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport>::GetNumericControl, usagePage, usageId, &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidFeatureReport<D>::GetNumericControlByDescription(winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription const& controlDescription) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport>::GetNumericControlByDescription, *(void**)(&controlDescription), &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidInputReport<D>::Id() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport>::get_Id, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidInputReport<D>::Data() const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport>::get_Data, &value);
        return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidInputReport<D>::ActivatedBooleanControls() const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport>::get_ActivatedBooleanControls, &value);
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidInputReport<D>::TransitionedBooleanControls() const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport>::get_TransitionedBooleanControls, &value);
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidInputReport<D>::GetBooleanControl(std::uint16_t usagePage, std::uint16_t usageId) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport>::GetBooleanControl, usagePage, usageId, &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidInputReport<D>::GetBooleanControlByDescription(winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription const& controlDescription) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport>::GetBooleanControlByDescription, *(void**)(&controlDescription), &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidInputReport<D>::GetNumericControl(std::uint16_t usagePage, std::uint16_t usageId) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport>::GetNumericControl, usagePage, usageId, &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidInputReport<D>::GetNumericControlByDescription(winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription const& controlDescription) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport>::GetNumericControlByDescription, *(void**)(&controlDescription), &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidInputReportReceivedEventArgs<D>::Report() const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReportReceivedEventArgs, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReportReceivedEventArgs>::get_Report, &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidInputReport{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControl<D>::Id() const
    {
        std::uint32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl>::get_Id, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControl<D>::IsGrouped() const
    {
        bool value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl>::get_IsGrouped, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControl<D>::UsagePage() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl>::get_UsagePage, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControl<D>::UsageId() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl>::get_UsageId, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControl<D>::Value() const
    {
        std::int64_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl>::get_Value, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControl<D>::Value(std::int64_t value) const
    {
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl>::put_Value, value);
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControl<D>::ScaledValue() const
    {
        std::int64_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl>::get_ScaledValue, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControl<D>::ScaledValue(std::int64_t value) const
    {
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl>::put_ScaledValue, value);
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControl<D>::ControlDescription() const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl>::get_ControlDescription, &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::Id() const
    {
        std::uint32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_Id, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::ReportId() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_ReportId, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::ReportType() const
    {
        winrt::Windows::Devices::HumanInterfaceDevice::HidReportType value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_ReportType, reinterpret_cast<std::int32_t*>(&value));
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::ReportSize() const
    {
        std::uint32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_ReportSize, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::ReportCount() const
    {
        std::uint32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_ReportCount, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::UsagePage() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_UsagePage, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::UsageId() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_UsageId, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::LogicalMinimum() const
    {
        std::int32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_LogicalMinimum, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::LogicalMaximum() const
    {
        std::int32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_LogicalMaximum, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::PhysicalMinimum() const
    {
        std::int32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_PhysicalMinimum, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::PhysicalMaximum() const
    {
        std::int32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_PhysicalMaximum, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::UnitExponent() const
    {
        std::uint32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_UnitExponent, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::Unit() const
    {
        std::uint32_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_Unit, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::IsAbsolute() const
    {
        bool value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_IsAbsolute, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::HasNull() const
    {
        bool value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_HasNull, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidNumericControlDescription<D>::ParentCollections() const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>::get_ParentCollections, &value);
        return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::HumanInterfaceDevice::HidCollection>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidOutputReport<D>::Id() const
    {
        std::uint16_t value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport>::get_Id, &value);
        return value;
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidOutputReport<D>::Data() const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport>::get_Data, &value);
        return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidOutputReport<D>::Data(winrt::Windows::Storage::Streams::IBuffer const& value) const
    {
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport>::put_Data, *(void**)(&value));
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidOutputReport<D>::GetBooleanControl(std::uint16_t usagePage, std::uint16_t usageId) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport>::GetBooleanControl, usagePage, usageId, &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidOutputReport<D>::GetBooleanControlByDescription(winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription const& controlDescription) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport>::GetBooleanControlByDescription, *(void**)(&controlDescription), &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidOutputReport<D>::GetNumericControl(std::uint16_t usagePage, std::uint16_t usageId) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport>::GetNumericControl, usagePage, usageId, &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Devices_HumanInterfaceDevice_IHidOutputReport<D>::GetNumericControlByDescription(winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription const& controlDescription) const
    {
        void* value{};
        consume_general<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport, D>(static_cast<D const*>(this), &abi_t<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport>::GetNumericControlByDescription, *(void**)(&controlDescription), &value);
        return winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl{ value, take_ownership_from_abi };
    }
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl> : produce_base<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl>
    {
        std::int32_t __stdcall get_Id(std::uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint32_t>(this->shim().Id());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UsagePage(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().UsagePage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UsageId(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().UsageId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_IsActive(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsActive());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall put_IsActive(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsActive(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ControlDescription(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription>(this->shim().ControlDescription());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription> : produce_base<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription>
    {
        std::int32_t __stdcall get_Id(std::uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint32_t>(this->shim().Id());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ReportId(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().ReportId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ReportType(std::int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidReportType>(this->shim().ReportType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UsagePage(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().UsagePage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UsageId(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().UsageId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ParentCollections(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::HumanInterfaceDevice::HidCollection>>(this->shim().ParentCollections());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription2> : produce_base<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription2>
    {
        std::int32_t __stdcall get_IsAbsolute(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsAbsolute());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidCollection> : produce_base<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidCollection>
    {
        std::int32_t __stdcall get_Id(std::uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint32_t>(this->shim().Id());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_Type(std::int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidCollectionType>(this->shim().Type());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UsagePage(std::uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint32_t>(this->shim().UsagePage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UsageId(std::uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint32_t>(this->shim().UsageId());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice> : produce_base<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice>
    {
        std::int32_t __stdcall get_VendorId(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().VendorId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ProductId(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().ProductId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_Version(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().Version());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UsagePage(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().UsagePage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UsageId(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().UsageId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetInputReportAsync(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Devices::HumanInterfaceDevice::HidInputReport>>(this->shim().GetInputReportAsync());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetInputReportByIdAsync(std::uint16_t reportId, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Devices::HumanInterfaceDevice::HidInputReport>>(this->shim().GetInputReportAsync(reportId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetFeatureReportAsync(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Devices::HumanInterfaceDevice::HidFeatureReport>>(this->shim().GetFeatureReportAsync());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetFeatureReportByIdAsync(std::uint16_t reportId, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Devices::HumanInterfaceDevice::HidFeatureReport>>(this->shim().GetFeatureReportAsync(reportId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall CreateOutputReport(void** outputReport) noexcept final try
        {
            clear_abi(outputReport);
            typename D::abi_guard guard(this->shim());
            *outputReport = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidOutputReport>(this->shim().CreateOutputReport());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall CreateOutputReportById(std::uint16_t reportId, void** outputReport) noexcept final try
        {
            clear_abi(outputReport);
            typename D::abi_guard guard(this->shim());
            *outputReport = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidOutputReport>(this->shim().CreateOutputReport(reportId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall CreateFeatureReport(void** featureReport) noexcept final try
        {
            clear_abi(featureReport);
            typename D::abi_guard guard(this->shim());
            *featureReport = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidFeatureReport>(this->shim().CreateFeatureReport());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall CreateFeatureReportById(std::uint16_t reportId, void** featureReport) noexcept final try
        {
            clear_abi(featureReport);
            typename D::abi_guard guard(this->shim());
            *featureReport = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidFeatureReport>(this->shim().CreateFeatureReport(reportId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall SendOutputReportAsync(void* outputReport, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<std::uint32_t>>(this->shim().SendOutputReportAsync(*reinterpret_cast<winrt::Windows::Devices::HumanInterfaceDevice::HidOutputReport const*>(&outputReport)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall SendFeatureReportAsync(void* featureReport, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<std::uint32_t>>(this->shim().SendFeatureReportAsync(*reinterpret_cast<winrt::Windows::Devices::HumanInterfaceDevice::HidFeatureReport const*>(&featureReport)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetBooleanControlDescriptions(std::int32_t reportType, std::uint16_t usagePage, std::uint16_t usageId, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription>>(this->shim().GetBooleanControlDescriptions(*reinterpret_cast<winrt::Windows::Devices::HumanInterfaceDevice::HidReportType const*>(&reportType), usagePage, usageId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetNumericControlDescriptions(std::int32_t reportType, std::uint16_t usagePage, std::uint16_t usageId, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription>>(this->shim().GetNumericControlDescriptions(*reinterpret_cast<winrt::Windows::Devices::HumanInterfaceDevice::HidReportType const*>(&reportType), usagePage, usageId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall add_InputReportReceived(void* reportHandler, winrt::event_token* token) noexcept final try
        {
            zero_abi<winrt::event_token>(token);
            typename D::abi_guard guard(this->shim());
            *token = detach_from<winrt::event_token>(this->shim().InputReportReceived(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Devices::HumanInterfaceDevice::HidDevice, winrt::Windows::Devices::HumanInterfaceDevice::HidInputReportReceivedEventArgs> const*>(&reportHandler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall remove_InputReportReceived(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().InputReportReceived(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidDeviceStatics> : produce_base<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidDeviceStatics>
    {
        std::int32_t __stdcall GetDeviceSelector(std::uint16_t usagePage, std::uint16_t usageId, void** selector) noexcept final try
        {
            clear_abi(selector);
            typename D::abi_guard guard(this->shim());
            *selector = detach_from<hstring>(this->shim().GetDeviceSelector(usagePage, usageId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetDeviceSelectorVidPid(std::uint16_t usagePage, std::uint16_t usageId, std::uint16_t vendorId, std::uint16_t productId, void** selector) noexcept final try
        {
            clear_abi(selector);
            typename D::abi_guard guard(this->shim());
            *selector = detach_from<hstring>(this->shim().GetDeviceSelector(usagePage, usageId, vendorId, productId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall FromIdAsync(void* deviceId, std::int32_t accessMode, void** hidDevice) noexcept final try
        {
            clear_abi(hidDevice);
            typename D::abi_guard guard(this->shim());
            *hidDevice = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Devices::HumanInterfaceDevice::HidDevice>>(this->shim().FromIdAsync(*reinterpret_cast<hstring const*>(&deviceId), *reinterpret_cast<winrt::Windows::Storage::FileAccessMode const*>(&accessMode)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport> : produce_base<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport>
    {
        std::int32_t __stdcall get_Id(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().Id());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_Data(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Storage::Streams::IBuffer>(this->shim().Data());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall put_Data(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Data(*reinterpret_cast<winrt::Windows::Storage::Streams::IBuffer const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetBooleanControl(std::uint16_t usagePage, std::uint16_t usageId, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl>(this->shim().GetBooleanControl(usagePage, usageId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetBooleanControlByDescription(void* controlDescription, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl>(this->shim().GetBooleanControlByDescription(*reinterpret_cast<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription const*>(&controlDescription)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetNumericControl(std::uint16_t usagePage, std::uint16_t usageId, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl>(this->shim().GetNumericControl(usagePage, usageId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetNumericControlByDescription(void* controlDescription, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl>(this->shim().GetNumericControlByDescription(*reinterpret_cast<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription const*>(&controlDescription)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport> : produce_base<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport>
    {
        std::int32_t __stdcall get_Id(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().Id());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_Data(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Storage::Streams::IBuffer>(this->shim().Data());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ActivatedBooleanControls(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl>>(this->shim().ActivatedBooleanControls());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_TransitionedBooleanControls(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl>>(this->shim().TransitionedBooleanControls());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetBooleanControl(std::uint16_t usagePage, std::uint16_t usageId, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl>(this->shim().GetBooleanControl(usagePage, usageId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetBooleanControlByDescription(void* controlDescription, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl>(this->shim().GetBooleanControlByDescription(*reinterpret_cast<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription const*>(&controlDescription)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetNumericControl(std::uint16_t usagePage, std::uint16_t usageId, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl>(this->shim().GetNumericControl(usagePage, usageId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetNumericControlByDescription(void* controlDescription, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl>(this->shim().GetNumericControlByDescription(*reinterpret_cast<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription const*>(&controlDescription)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReportReceivedEventArgs> : produce_base<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReportReceivedEventArgs>
    {
        std::int32_t __stdcall get_Report(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidInputReport>(this->shim().Report());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl> : produce_base<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl>
    {
        std::int32_t __stdcall get_Id(std::uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint32_t>(this->shim().Id());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_IsGrouped(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsGrouped());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UsagePage(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().UsagePage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UsageId(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().UsageId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_Value(std::int64_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::int64_t>(this->shim().Value());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall put_Value(std::int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Value(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ScaledValue(std::int64_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::int64_t>(this->shim().ScaledValue());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall put_ScaledValue(std::int64_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScaledValue(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ControlDescription(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription>(this->shim().ControlDescription());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription> : produce_base<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription>
    {
        std::int32_t __stdcall get_Id(std::uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint32_t>(this->shim().Id());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ReportId(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().ReportId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ReportType(std::int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidReportType>(this->shim().ReportType());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ReportSize(std::uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint32_t>(this->shim().ReportSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ReportCount(std::uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint32_t>(this->shim().ReportCount());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UsagePage(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().UsagePage());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UsageId(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().UsageId());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_LogicalMinimum(std::int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::int32_t>(this->shim().LogicalMinimum());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_LogicalMaximum(std::int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::int32_t>(this->shim().LogicalMaximum());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_PhysicalMinimum(std::int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::int32_t>(this->shim().PhysicalMinimum());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_PhysicalMaximum(std::int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::int32_t>(this->shim().PhysicalMaximum());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_UnitExponent(std::uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint32_t>(this->shim().UnitExponent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_Unit(std::uint32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint32_t>(this->shim().Unit());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_IsAbsolute(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsAbsolute());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_HasNull(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasNull());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_ParentCollections(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::HumanInterfaceDevice::HidCollection>>(this->shim().ParentCollections());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport> : produce_base<D, winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport>
    {
        std::int32_t __stdcall get_Id(std::uint16_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<std::uint16_t>(this->shim().Id());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall get_Data(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Storage::Streams::IBuffer>(this->shim().Data());
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall put_Data(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Data(*reinterpret_cast<winrt::Windows::Storage::Streams::IBuffer const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetBooleanControl(std::uint16_t usagePage, std::uint16_t usageId, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl>(this->shim().GetBooleanControl(usagePage, usageId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetBooleanControlByDescription(void* controlDescription, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl>(this->shim().GetBooleanControlByDescription(*reinterpret_cast<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription const*>(&controlDescription)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetNumericControl(std::uint16_t usagePage, std::uint16_t usageId, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl>(this->shim().GetNumericControl(usagePage, usageId));
            return 0;
        }
        catch (...) { return to_hresult(); }
        std::int32_t __stdcall GetNumericControlByDescription(void* controlDescription, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl>(this->shim().GetNumericControlByDescription(*reinterpret_cast<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription const*>(&controlDescription)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif // WINRT_LEAN_AND_MEAN
}
WINRT_EXPORT namespace winrt::Windows::Devices::HumanInterfaceDevice
{
    inline auto HidDevice::GetDeviceSelector(std::uint16_t usagePage, std::uint16_t usageId)
    {
        return impl::call_factory<HidDevice, IHidDeviceStatics>([&](IHidDeviceStatics const& f) { return f.GetDeviceSelector(usagePage, usageId); });
    }
    inline auto HidDevice::GetDeviceSelector(std::uint16_t usagePage, std::uint16_t usageId, std::uint16_t vendorId, std::uint16_t productId)
    {
        return impl::call_factory<HidDevice, IHidDeviceStatics>([&](IHidDeviceStatics const& f) { return f.GetDeviceSelector(usagePage, usageId, vendorId, productId); });
    }
    inline auto HidDevice::FromIdAsync(param::hstring const& deviceId, winrt::Windows::Storage::FileAccessMode const& accessMode)
    {
        return impl::call_factory<HidDevice, IHidDeviceStatics>([&](IHidDeviceStatics const& f) { return f.FromIdAsync(deviceId, accessMode); });
    }
}
namespace std
{
#ifndef WINRT_LEAN_AND_MEAN
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::IHidBooleanControlDescription2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::IHidCollection> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::IHidDevice> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::IHidDeviceStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::IHidFeatureReport> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReport> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::IHidInputReportReceivedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::IHidNumericControlDescription> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::IHidOutputReport> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::HidBooleanControlDescription> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::HidCollection> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::HidDevice> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::HidFeatureReport> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::HidInputReport> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::HidInputReportReceivedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControl> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::HidNumericControlDescription> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Windows::Devices::HumanInterfaceDevice::HidOutputReport> : winrt::impl::hash_base {};
#endif // WINRT_LEAN_AND_MEAN
#ifdef __cpp_lib_format
#endif // __cpp_lib_format
}
#endif
#endif // WINRT_IMPORT_MODULE
