| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
#ifndef HIDAPI_CFGMGR32_H |
| 21 |
#define HIDAPI_CFGMGR32_H |
| 22 |
|
| 23 |
#ifdef HIDAPI_USE_DDK |
| 24 |
|
| 25 |
#include <cfgmgr32.h> |
| 26 |
#include <initguid.h> |
| 27 |
#include <devpkey.h> |
| 28 |
#include <propkey.h> |
| 29 |
|
| 30 |
#else |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
#include <initguid.h> |
| 36 |
#include <devpropdef.h> |
| 37 |
#include <propkeydef.h> |
| 38 |
|
| 39 |
typedef DWORD RETURN_TYPE; |
| 40 |
typedef RETURN_TYPE CONFIGRET; |
| 41 |
typedef DWORD DEVNODE, DEVINST; |
| 42 |
typedef DEVNODE* PDEVNODE, * PDEVINST; |
| 43 |
typedef WCHAR* DEVNODEID_W, * DEVINSTID_W; |
| 44 |
|
| 45 |
#define CR_SUCCESS (0x00000000) |
| 46 |
#define CR_BUFFER_SMALL (0x0000001A) |
| 47 |
#define CR_FAILURE (0x00000013) |
| 48 |
|
| 49 |
#define CM_LOCATE_DEVNODE_NORMAL 0x00000000 |
| 50 |
|
| 51 |
#define CM_GET_DEVICE_INTERFACE_LIST_PRESENT (0x00000000) |
| 52 |
|
| 53 |
typedef CONFIGRET(__stdcall* CM_Locate_DevNodeW_)(PDEVINST pdnDevInst, DEVINSTID_W pDeviceID, ULONG ulFlags); |
| 54 |
typedef CONFIGRET(__stdcall* CM_Get_Parent_)(PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags); |
| 55 |
typedef CONFIGRET(__stdcall* CM_Get_DevNode_PropertyW_)(DEVINST dnDevInst, CONST DEVPROPKEY* PropertyKey, DEVPROPTYPE* PropertyType, PBYTE PropertyBuffer, PULONG PropertyBufferSize, ULONG ulFlags); |
| 56 |
typedef CONFIGRET(__stdcall* CM_Get_Device_Interface_PropertyW_)(LPCWSTR pszDeviceInterface, CONST DEVPROPKEY* PropertyKey, DEVPROPTYPE* PropertyType, PBYTE PropertyBuffer, PULONG PropertyBufferSize, ULONG ulFlags); |
| 57 |
typedef CONFIGRET(__stdcall* CM_Get_Device_Interface_List_SizeW_)(PULONG pulLen, LPGUID InterfaceClassGuid, DEVINSTID_W pDeviceID, ULONG ulFlags); |
| 58 |
typedef CONFIGRET(__stdcall* CM_Get_Device_Interface_ListW_)(LPGUID InterfaceClassGuid, DEVINSTID_W pDeviceID, PZZWSTR Buffer, ULONG BufferLen, ULONG ulFlags); |
| 59 |
|
| 60 |
|
| 61 |
DEFINE_DEVPROPKEY(DEVPKEY_NAME, 0xb725f130, 0x47ef, 0x101a, 0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac, 10); |
| 62 |
DEFINE_DEVPROPKEY(DEVPKEY_Device_Manufacturer, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 13); |
| 63 |
DEFINE_DEVPROPKEY(DEVPKEY_Device_InstanceId, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 256); |
| 64 |
DEFINE_DEVPROPKEY(DEVPKEY_Device_HardwareIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 3); |
| 65 |
DEFINE_DEVPROPKEY(DEVPKEY_Device_CompatibleIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 4); |
| 66 |
DEFINE_DEVPROPKEY(DEVPKEY_Device_ContainerId, 0x8c7ed206, 0x3f8a, 0x4827, 0xb3, 0xab, 0xae, 0x9e, 0x1f, 0xae, 0xfc, 0x6c, 2); |
| 67 |
|
| 68 |
|
| 69 |
DEFINE_PROPERTYKEY(PKEY_DeviceInterface_Bluetooth_DeviceAddress, 0x2BD67D8B, 0x8BEB, 0x48D5, 0x87, 0xE0, 0x6C, 0xDA, 0x34, 0x28, 0x04, 0x0A, 1); |
| 70 |
DEFINE_PROPERTYKEY(PKEY_DeviceInterface_Bluetooth_Manufacturer, 0x2BD67D8B, 0x8BEB, 0x48D5, 0x87, 0xE0, 0x6C, 0xDA, 0x34, 0x28, 0x04, 0x0A, 4); |
| 71 |
DEFINE_PROPERTYKEY(PKEY_DeviceInterface_Bluetooth_ModelNumber, 0x2BD67D8B, 0x8BEB, 0x48D5, 0x87, 0xE0, 0x6C, 0xDA, 0x34, 0x28, 0x04, 0x0A, 5); |
| 72 |
|
| 73 |
#endif |
| 74 |
|
| 75 |
#endif |