SetupDiGetDeviceRegistryProperty(,,SPDRP_xxx,,,)的结果
2012-11-06 16:43
218 查看
HDEVINFO hDevInfo = SetupDiGetClassDevs(0, "USB", 0, DIGCF_ALLCLASSES | DIGCF_PRESENT)
DWORD dwIndex = 0;
SP_DEVINFO_DATA spDevInfoData = {0};
spDevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
SetupDiEnumDeviceInfo(hDevInfo, dwIndex++, &spDevInfoData)
SetupDiGetDeviceRegistryProperty(hDevInfo, &spDevInfoData, SPDRP_xxx,,,)
#define SPDRP_DEVICEDESC (0x00000000) // DeviceDesc (R/W)
"USB 人体学输入设备"
#define SPDRP_HARDWAREID (0x00000001) // HardwareID (R/W)
"USB\Vid_09da&Pid_000a&Rev_0002"
#define SPDRP_COMPATIBLEIDS (0x00000002) // CompatibleIDs (R/W)
"USB\Class_03&SubClass_01&Prot_02"
#define SPDRP_UNUSED0 (0x00000003) // unused ""
#define SPDRP_SERVICE (0x00000004) // Service (R/W)
"HidUsb"
#define SPDRP_UNUSED1 (0x00000005) // unused ""
#define SPDRP_UNUSED2 (0x00000006) // unused ""
#define SPDRP_CLASS (0x00000007) // Class (R--tied to ClassGUID)
"HIDClass"
#define SPDRP_CLASSGUID (0x00000008) // ClassGUID (R/W)
"{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}"
#define SPDRP_DRIVER (0x00000009) // Driver (R/W)
"{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\0008"
#define SPDRP_CONFIGFLAGS (0x0000000A) // ConfigFlags (R/W) ""
#define SPDRP_MFG (0x0000000B) // Mfg (R/W)
"(标准系统设备)"
#define SPDRP_FRIENDLYNAME (0x0000000C) // FriendlyName (R/W) ""
#define SPDRP_LOCATION_INFORMATION (0x0000000D) // LocationInformation (R/W)
"PS/2+USB Mouse"
#define SPDRP_PHYSICAL_DEVICE_OBJECT_NAME (0x0000000E) // PhysicalDeviceObjectName (R)
"\Device\USBPDO-8"
#define SPDRP_CAPABILITIES (0x0000000F) // Capabilities (R) ""
#define SPDRP_UI_NUMBER (0x00000010) // UiNumber (R) ""
#define SPDRP_UPPERFILTERS (0x00000011) // UpperFilters (R/W) ""
#define SPDRP_LOWERFILTERS (0x00000012) // LowerFilters (R/W) ""
#define SPDRP_BUSTYPEGUID (0x00000013) // BusTypeGUID (R)
{bceb7d9d-5dc8-d111-9eb4-006008c3a19a}
#define SPDRP_LEGACYBUSTYPE (0x00000014) // LegacyBusType (R)
0f
#define SPDRP_BUSNUMBER (0x00000015) // BusNumber (R) ""
#define SPDRP_ENUMERATOR_NAME (0x00000016) // Enumerator Name (R)
"USB"
#define SPDRP_SECURITY (0x00000017) // Security (R/W, binary form) ""
#define SPDRP_SECURITY_SDS (0x00000018) // Security (W, SDS form) ""
#define SPDRP_DEVTYPE (0x00000019) // Device Type (R/W) ""
#define SPDRP_EXCLUSIVE (0x0000001A) // Device is exclusive-access (R/W)""
#define SPDRP_CHARACTERISTICS (0x0000001B) // Device Characteristics (R/W) ""
#define SPDRP_ADDRESS (0x0000001C) // Device Address (R)
01
#define SPDRP_UI_NUMBER_DESC_FORMAT (0X0000001D) // UiNumberDescFormat (R/W) ""
#define SPDRP_DEVICE_POWER_DATA (0x0000001E) // Device Power Data (R)
"8"
#define SPDRP_REMOVAL_POLICY (0x0000001F) // Removal Policy (R)
03
#define SPDRP_REMOVAL_POLICY_HW_DEFAULT (0x00000020) // Hardware Removal Policy (R)
03
#define SPDRP_REMOVAL_POLICY_OVERRIDE (0x00000021) // Removal Policy Override (RW) ""
#define SPDRP_INSTALL_STATE (0x00000022) // Device Install State (R) ""
#define SPDRP_LOCATION_PATHS (0x00000023) // Device Location Paths (R) ""
#define SPDRP_BASE_CONTAINERID (0x00000024) // Base ContainerID (R) ""
DWORD dwIndex = 0;
SP_DEVINFO_DATA spDevInfoData = {0};
spDevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
SetupDiEnumDeviceInfo(hDevInfo, dwIndex++, &spDevInfoData)
SetupDiGetDeviceRegistryProperty(hDevInfo, &spDevInfoData, SPDRP_xxx,,,)
#define SPDRP_DEVICEDESC (0x00000000) // DeviceDesc (R/W)
"USB 人体学输入设备"
#define SPDRP_HARDWAREID (0x00000001) // HardwareID (R/W)
"USB\Vid_09da&Pid_000a&Rev_0002"
#define SPDRP_COMPATIBLEIDS (0x00000002) // CompatibleIDs (R/W)
"USB\Class_03&SubClass_01&Prot_02"
#define SPDRP_UNUSED0 (0x00000003) // unused ""
#define SPDRP_SERVICE (0x00000004) // Service (R/W)
"HidUsb"
#define SPDRP_UNUSED1 (0x00000005) // unused ""
#define SPDRP_UNUSED2 (0x00000006) // unused ""
#define SPDRP_CLASS (0x00000007) // Class (R--tied to ClassGUID)
"HIDClass"
#define SPDRP_CLASSGUID (0x00000008) // ClassGUID (R/W)
"{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}"
#define SPDRP_DRIVER (0x00000009) // Driver (R/W)
"{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}\0008"
#define SPDRP_CONFIGFLAGS (0x0000000A) // ConfigFlags (R/W) ""
#define SPDRP_MFG (0x0000000B) // Mfg (R/W)
"(标准系统设备)"
#define SPDRP_FRIENDLYNAME (0x0000000C) // FriendlyName (R/W) ""
#define SPDRP_LOCATION_INFORMATION (0x0000000D) // LocationInformation (R/W)
"PS/2+USB Mouse"
#define SPDRP_PHYSICAL_DEVICE_OBJECT_NAME (0x0000000E) // PhysicalDeviceObjectName (R)
"\Device\USBPDO-8"
#define SPDRP_CAPABILITIES (0x0000000F) // Capabilities (R) ""
#define SPDRP_UI_NUMBER (0x00000010) // UiNumber (R) ""
#define SPDRP_UPPERFILTERS (0x00000011) // UpperFilters (R/W) ""
#define SPDRP_LOWERFILTERS (0x00000012) // LowerFilters (R/W) ""
#define SPDRP_BUSTYPEGUID (0x00000013) // BusTypeGUID (R)
{bceb7d9d-5dc8-d111-9eb4-006008c3a19a}
#define SPDRP_LEGACYBUSTYPE (0x00000014) // LegacyBusType (R)
0f
#define SPDRP_BUSNUMBER (0x00000015) // BusNumber (R) ""
#define SPDRP_ENUMERATOR_NAME (0x00000016) // Enumerator Name (R)
"USB"
#define SPDRP_SECURITY (0x00000017) // Security (R/W, binary form) ""
#define SPDRP_SECURITY_SDS (0x00000018) // Security (W, SDS form) ""
#define SPDRP_DEVTYPE (0x00000019) // Device Type (R/W) ""
#define SPDRP_EXCLUSIVE (0x0000001A) // Device is exclusive-access (R/W)""
#define SPDRP_CHARACTERISTICS (0x0000001B) // Device Characteristics (R/W) ""
#define SPDRP_ADDRESS (0x0000001C) // Device Address (R)
01
#define SPDRP_UI_NUMBER_DESC_FORMAT (0X0000001D) // UiNumberDescFormat (R/W) ""
#define SPDRP_DEVICE_POWER_DATA (0x0000001E) // Device Power Data (R)
"8"
#define SPDRP_REMOVAL_POLICY (0x0000001F) // Removal Policy (R)
03
#define SPDRP_REMOVAL_POLICY_HW_DEFAULT (0x00000020) // Hardware Removal Policy (R)
03
#define SPDRP_REMOVAL_POLICY_OVERRIDE (0x00000021) // Removal Policy Override (RW) ""
#define SPDRP_INSTALL_STATE (0x00000022) // Device Install State (R) ""
#define SPDRP_LOCATION_PATHS (0x00000023) // Device Location Paths (R) ""
#define SPDRP_BASE_CONTAINERID (0x00000024) // Base ContainerID (R) ""
相关文章推荐
- SetupDiGetDeviceRegistryProperty在Windows2000导致死机的解决办法
- SetupDiGetDeviceRegistryProperty-使用SetupDi系列函数进行设备信息的管理(三)
- SetupDiGetDeviceInterfaceDetail 函数
- SetupDiGetDeviceInterfaceDetail
- SetupDiGetDeviceInterfaceDetail
- SetupDiGetDeviceInterfaceDetail 函数
- SetupDiGetDeviceInstanceId获取ID的疑问
- angular在模板中使用属性引发Cannot read property 'xxx' of undefined
- [2012-05-10 09:52:11 - xxx] Failed to install xxx.apk on device '100046a35a59': timeout
- Salesforce Lightning 使用lightning:dualListbox报错“Can not read property 'xxx' of undefined”
- javaweb开发常见错误Cannot find any information on property 'XXX' in a bean of type 'XXX'
- There is no getter for property named 'XXX' in 'class java.lang.String'
- 求助:关于IoCreateFileSpecifyDeviceObjectHint返回结果是STATUS_INVALID_DEVICE_OBJECT_PARAMETER的问题
- struts中 bean:write name="xxx" property="非String" 报错
- Duplicate property mapping of xxx found in xx 解决办发
- javax.el.PropertyNotFoundException: Property 'xxx' not found on type com.xxx.xxx
- class_create(),class_device_create()创建/dev/xxx 名字
- Type interface com.xxx.xx.xxxDao is not known to the MapperRegistry
- PropertyNotFoundException:could not find a setter forXXX
- File xxx specified for property 'resourceFile' does not exist.解决方法