我有一个在Windows XP上编译的程序,现在我试图在Windows 7(x86和x64)上运行它。该程序使用DirectSound8来枚举机器上的所有声音设备。问题是,枚举函数返回DirectSoundEnumerate(...)
在Windows XP和Windows 7的DirectSoundEnumerate()不会在Windows 7上列出驱动程序名称
Windows XP Device GUID = Device description = Primary Sound Driver Driver name = Device GUID = {bd6dd71a-3deb-11d1-b171-00c04fc20000} Device description = SigmaTel Audio Driver name = sthda.sys Windows 7 x86 Device GUID = Device description = Primary Sound Driver Driver name = Device GUID = {4a1bd997-3986-4b7a-af02-7143e86af46c} Device description = Speakers/Headphones (SigmaTel High Definition Audio CODEC) Driver name = {0.0.0.00000000}.{4a1bd997-3986-4b7a-af02-7143e86af46c} Windows 7 x64 Device GUID = Device description = Primary Sound Driver Driver name = Device GUID = {aaee894b-7a80-44ff-805c-8d5e12207136} Device description = Speakers/Headphones (SigmaTel High Definition Audio CODEC (for 64-bit Windows)) Driver name = {0.0.0.00000000}.{aaee894b-7a80-44ff-805c-8d5e12207136}
三个机器上面列出的有戴尔Precision 390
程序相同配置驱动程序名称不同的结果从DX9SDK_DEC2005链接到“DSound.lib”。
有谁知道为什么Windows 7将驱动程序名称作为GUID而不是驱动程序名称返回?
我想你是指**模块名称**。你需要什么?要识别设备,最好使用GUID。 – 2011-03-24 13:37:55
是的,我的意思是模块名称(都看作参数名称)。该程序使用模块名称和设备描述将扬声器设备与麦克风设备(耳机)相匹配。我重新编译了代码,并删除了模块名称的匹配(只匹配设备描述),然后工作。但是,问题依然存在。 – Oskar 2011-03-24 17:31:02
我会回答你的问题为“它只是”,虽然这可能不是一个令人满意的答案。毕竟,DirectX正在停止,至少对于.NET而言。 – 2011-03-25 07:50:03