Path: blob/master/thirdparty/sdl/hidapi/windows/hidapi_cfgmgr32.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#ifndef HIDAPI_CFGMGR32_H20#define HIDAPI_CFGMGR32_H2122#ifdef HIDAPI_USE_DDK2324#include <cfgmgr32.h>25#include <initguid.h>26#include <devpkey.h>27#include <propkey.h>2829#else3031/* This part of the header mimics cfgmgr32.h,32but only what is used by HIDAPI */3334//#include <initguid.h>35#include <devpropdef.h>36//#include <propkeydef.h>3738#ifndef PROPERTYKEY_DEFINED39#define PROPERTYKEY_DEFINED4041typedef struct42{43GUID fmtid;44DWORD pid;45} PROPERTYKEY;4647#endif /* PROPERTYKEY_DEFINED */4849typedef DWORD RETURN_TYPE;50typedef RETURN_TYPE CONFIGRET;51typedef DWORD DEVNODE, DEVINST;52typedef DEVNODE* PDEVNODE, * PDEVINST;53typedef WCHAR* DEVNODEID_W, * DEVINSTID_W;5455#define CR_SUCCESS (0x00000000)56#define CR_BUFFER_SMALL (0x0000001A)57#define CR_FAILURE (0x00000013)5859#define CM_LOCATE_DEVNODE_NORMAL 0x000000006061#define CM_GET_DEVICE_INTERFACE_LIST_PRESENT (0x00000000)6263typedef CONFIGRET(__stdcall* CM_Locate_DevNodeW_)(PDEVINST pdnDevInst, DEVINSTID_W pDeviceID, ULONG ulFlags);64typedef CONFIGRET(__stdcall* CM_Get_Parent_)(PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags);65typedef CONFIGRET(__stdcall* CM_Get_DevNode_PropertyW_)(DEVINST dnDevInst, CONST DEVPROPKEY* PropertyKey, DEVPROPTYPE* PropertyType, PBYTE PropertyBuffer, PULONG PropertyBufferSize, ULONG ulFlags);66typedef CONFIGRET(__stdcall* CM_Get_Device_Interface_PropertyW_)(LPCWSTR pszDeviceInterface, CONST DEVPROPKEY* PropertyKey, DEVPROPTYPE* PropertyType, PBYTE PropertyBuffer, PULONG PropertyBufferSize, ULONG ulFlags);67typedef CONFIGRET(__stdcall* CM_Get_Device_Interface_List_SizeW_)(PULONG pulLen, LPGUID InterfaceClassGuid, DEVINSTID_W pDeviceID, ULONG ulFlags);68typedef CONFIGRET(__stdcall* CM_Get_Device_Interface_ListW_)(LPGUID InterfaceClassGuid, DEVINSTID_W pDeviceID, WCHAR* /*PZZWSTR*/ Buffer, ULONG BufferLen, ULONG ulFlags);6970// from devpkey.h71static DEVPROPKEY DEVPKEY_NAME = { { 0xb725f130, 0x47ef, 0x101a, {0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac} }, 10 }; // DEVPROP_TYPE_STRING72static DEVPROPKEY DEVPKEY_Device_Manufacturer = { { 0xa45c254e, 0xdf1c, 0x4efd, {0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0} }, 13 }; // DEVPROP_TYPE_STRING73static DEVPROPKEY DEVPKEY_Device_InstanceId = { { 0x78c34fc8, 0x104a, 0x4aca, {0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57} }, 256 }; // DEVPROP_TYPE_STRING74static DEVPROPKEY DEVPKEY_Device_HardwareIds = { { 0xa45c254e, 0xdf1c, 0x4efd, {0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0} }, 3 }; // DEVPROP_TYPE_STRING_LIST75static DEVPROPKEY DEVPKEY_Device_CompatibleIds = { { 0xa45c254e, 0xdf1c, 0x4efd, {0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0} }, 4 }; // DEVPROP_TYPE_STRING_LIST76static DEVPROPKEY DEVPKEY_Device_ContainerId = { { 0x8c7ed206, 0x3f8a, 0x4827, {0xb3, 0xab, 0xae, 0x9e, 0x1f, 0xae, 0xfc, 0x6c} }, 2 }; // DEVPROP_TYPE_GUID7778// from propkey.h79static PROPERTYKEY PKEY_DeviceInterface_Bluetooth_DeviceAddress = { { 0x2bd67d8b, 0x8beb, 0x48d5, {0x87, 0xe0, 0x6c, 0xda, 0x34, 0x28, 0x04, 0x0a} }, 1 }; // DEVPROP_TYPE_STRING80static PROPERTYKEY PKEY_DeviceInterface_Bluetooth_Manufacturer = { { 0x2bd67d8b, 0x8beb, 0x48d5, {0x87, 0xe0, 0x6c, 0xda, 0x34, 0x28, 0x04, 0x0a} }, 4 }; // DEVPROP_TYPE_STRING81static PROPERTYKEY PKEY_DeviceInterface_Bluetooth_ModelNumber = { { 0x2BD67D8B, 0x8BEB, 0x48D5, {0x87, 0xE0, 0x6C, 0xDA, 0x34, 0x28, 0x04, 0x0A} }, 5 }; // DEVPROP_TYPE_STRING8283#endif8485#endif /* HIDAPI_CFGMGR32_H */868788