USB音频设备注册表HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaCategories下GUID分析
2023-09-15
227
0
windows系统下的注册表:
计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaCategories
在很多的GUID,从MediaCategories来看,是多媒体设备的目录分类,所以以下的GUID应与多媒体设备相关。
该目录下,后缀符合以下格式的GUID即为音频设备:
{xxxxxxxx-xxxx-xxxx-a72f-a5bf64c86eba}
其内容解释为:
#define INIT_USBAUDIO_PRODUCT_NAME ( guid,
vid,
pid,
strIndex
)
Value:
{\
(guid)->Data1 = 0XFC575048 + (USHORT)(vid);\
(guid)->Data2 = 0x2E08 + (USHORT)(pid);\
(guid)->Data3 = 0x463B + (USHORT)(strIndex);\
(guid)->Data4[0] = 0xA7;\
(guid)->Data4[1] = 0x2F;\
(guid)->Data4[2] = 0xA5;\
(guid)->Data4[3] = 0xBF;\
(guid)->Data4[4] = 0x64;\
(guid)->Data4[5] = 0xC8;\
(guid)->Data4[6] = 0x6E;\
(guid)->Data4[7] = 0xBA;\
}
该GUID下一般有一键名为Name的REG_SZ类型的字符串,其值内容为USB设备描述符字符串iProduct对应的字符串。
根据REACTOS源代码,另外几个宏如下:
VID
#define INIT_USBAUDIO_MID(guid, id )
{\
(guid)->Data1 = 0x4e1cecd2 + (USHORT)(id);\
(guid)->Data2 = 0x1679;\
(guid)->Data3 = 0x463b;\
(guid)->Data4[0] = 0xa7;\
(guid)->Data4[1] = 0x2f;\
(guid)->Data4[2] = 0xa5;\
(guid)->Data4[3] = 0xbf;\
(guid)->Data4[4] = 0x64;\
(guid)->Data4[5] = 0xc8;\
(guid)->Data4[6] = 0x6e;\
(guid)->Data4[7] = 0xba;\
}
PID
#define INIT_USBAUDIO_PID ( guid, id )
{\
(guid)->Data1 = 0xabcc5a5e + (USHORT)(id);\
(guid)->Data2 = 0xc263;\
(guid)->Data3 = 0x463b;\
(guid)->Data4[0] = 0xa7;\
(guid)->Data4[1] = 0x2f;\
(guid)->Data4[2] = 0xa5;\
(guid)->Data4[3] = 0xbf;\
(guid)->Data4[4] = 0x64;\
(guid)->Data4[5] = 0xc8;\
(guid)->Data4[6] = 0x6e;\
(guid)->Data4[7] = 0xba;\
}
idProduct
INIT_USBAUDIO_PRODUCT_NAME
#define INIT_USBAUDIO_PRODUCT_NAME (guid, vid, pid, strIndex)
{\
(guid)->Data1 = 0XFC575048 + (USHORT)(vid);\
(guid)->Data2 = 0x2E08 + (USHORT)(pid);\
(guid)->Data3 = 0x463B + (USHORT)(strIndex);\
(guid)->Data4[0] = 0xA7;\
(guid)->Data4[1] = 0x2F;\
(guid)->Data4[2] = 0xA5;\
(guid)->Data4[3] = 0xBF;\
(guid)->Data4[4] = 0x64;\
(guid)->Data4[5] = 0xC8;\
(guid)->Data4[6] = 0x6E;\
(guid)->Data4[7] = 0xBA;\
}
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936