Path: blob/master/thirdparty/sdl/hidapi/windows/hidapi_winapi.h
9917 views
/*******************************************************1HIDAPI - Multi-Platform library for2communication with HID devices.34libusb/hidapi Team56Copyright 2022, All Rights Reserved.78At the discretion of the user of this library,9this software may be licensed under the terms of the10GNU General Public License v3, a BSD-Style license, or the11original HIDAPI license as outlined in the LICENSE.txt,12LICENSE-gpl3.txt, LICENSE-bsd.txt, and LICENSE-orig.txt13files located at the root of the source distribution.14These files may also be found in the public source15code repository located at:16https://github.com/libusb/hidapi .17********************************************************/1819/** @file20* @defgroup API hidapi API21*22* Since version 0.12.0, @ref HID_API_VERSION >= HID_API_MAKE_VERSION(0, 12, 0)23*/2425#ifndef HIDAPI_WINAPI_H__26#define HIDAPI_WINAPI_H__2728#include <stdint.h>2930#include <guiddef.h>3132#include "../hidapi/hidapi.h"3334#ifdef __cplusplus35extern "C" {36#endif3738/** @brief Get the container ID for a HID device.3940Since version 0.12.0, @ref HID_API_VERSION >= HID_API_MAKE_VERSION(0, 12, 0)4142This function returns the `DEVPKEY_Device_ContainerId` property of43the given device. This can be used to correlate different44interfaces/ports on the same hardware device.4546@ingroup API47@param dev A device handle returned from hid_open().48@param container_id The device's container ID on return.4950@returns51This function returns 0 on success and -1 on error.52*/53int HID_API_EXPORT_CALL hid_winapi_get_container_id(hid_device *dev, GUID *container_id);5455/**56* @brief Reconstructs a HID Report Descriptor from a Win32 HIDP_PREPARSED_DATA structure.57* This reconstructed report descriptor is logical identical to the real report descriptor,58* but not byte wise identical.59*60* @param[in] hidp_preparsed_data Pointer to the HIDP_PREPARSED_DATA to read, i.e.: the value of PHIDP_PREPARSED_DATA,61* as returned by HidD_GetPreparsedData WinAPI function.62* @param buf Pointer to the buffer where the report descriptor should be stored.63* @param[in] buf_size Size of the buffer. The recommended size for the buffer is @ref HID_API_MAX_REPORT_DESCRIPTOR_SIZE bytes.64*65* @return Returns size of reconstructed report descriptor if successful, -1 for error.66*/67int HID_API_EXPORT_CALL hid_winapi_descriptor_reconstruct_pp_data(void *hidp_preparsed_data, unsigned char *buf, size_t buf_size);6869#ifdef __cplusplus70}71#endif7273#endif747576