"Device Instance Path" 个名字有名字限制吗?
Are there name restrictions on "Device Instance Path" names?
我问的是 Win32 设备实例路径名称。您会在设备管理器中看到这些类型的路径。示例设备实例路径名称是键盘的 ACPI\DLLK0706&11583659&0
。
设备实例路径名有什么限制吗?例如,我没有看到任何长度超过 255 个字符的路径名,或使用任何非 ASCII 字符,但这些限制是真实的还是巧合?
PDO 设备处理 IRP_MN_QUERY_ID
时返回的设备实例路径。并且存在一些长度限制(必须小于 MAX_DEVICE_ID_LEN 个字符)并且不能使用任何非 ASCII 字符(所有必须在 [0x20, 0x80) 范围内,不能是 ';' 字符串 )
If a driver returns an ID with an illegal character, the system will
bug check. Characters with the following values are illegal in an ID
for this IRP:
- Less than or equal to 0x20 (' ')
- Greater than 0x7F
- Equal to 0x2C (',')
A driver must conform to the following length restrictions for IDs:
- Each hardware ID or compatible ID that a driver returns in this IRP must be less than MAX_DEVICE_ID_LEN characters long. This constant
currently has a value of 200 as defined in sdk\inc\cfgmgr32.h.
- The container ID that a driver returns in this IRP must be formatted as a globally unique identifier (GUID), and must be
MAX_GUID_STRING_LEN characters, which includes the null terminator.
- If a bus driver supplies globally unique instance IDs for its child devices (that is, the driver sets DEVICE_CAPABILITIES.UniqueID for
the devices), then the combination of device ID plus instance ID must
be less than (MAX_DEVICE_ID_LEN - 1) characters. The operating
system requires the additional character for a path separator.
- If a bus driver does not supply globally unique instance IDs for its child devices, then the combination of device ID plus instance
ID must be less than (MAX_DEVICE_ID_LEN - 28). The value of
this equation is currently 172.
我问的是 Win32 设备实例路径名称。您会在设备管理器中看到这些类型的路径。示例设备实例路径名称是键盘的 ACPI\DLLK0706&11583659&0
。
设备实例路径名有什么限制吗?例如,我没有看到任何长度超过 255 个字符的路径名,或使用任何非 ASCII 字符,但这些限制是真实的还是巧合?
PDO 设备处理 IRP_MN_QUERY_ID
时返回的设备实例路径。并且存在一些长度限制(必须小于 MAX_DEVICE_ID_LEN 个字符)并且不能使用任何非 ASCII 字符(所有必须在 [0x20, 0x80) 范围内,不能是 ';' 字符串 )
If a driver returns an ID with an illegal character, the system will bug check. Characters with the following values are illegal in an ID for this IRP:
- Less than or equal to 0x20 (' ')
- Greater than 0x7F
- Equal to 0x2C (',')
A driver must conform to the following length restrictions for IDs:
- Each hardware ID or compatible ID that a driver returns in this IRP must be less than MAX_DEVICE_ID_LEN characters long. This constant currently has a value of 200 as defined in sdk\inc\cfgmgr32.h.
- The container ID that a driver returns in this IRP must be formatted as a globally unique identifier (GUID), and must be
MAX_GUID_STRING_LEN characters, which includes the null terminator.- If a bus driver supplies globally unique instance IDs for its child devices (that is, the driver sets DEVICE_CAPABILITIES.UniqueID for
the devices), then the combination of device ID plus instance ID must be less than (MAX_DEVICE_ID_LEN - 1) characters. The operating system requires the additional character for a path separator.- If a bus driver does not supply globally unique instance IDs for its child devices, then the combination of device ID plus instance ID must be less than (MAX_DEVICE_ID_LEN - 28). The value of this equation is currently 172.