我需要在 firefox 扩展中使用一些 SetupAPI 函数。我需要检索设备的友好名称。我认为它可以通过SetupDiGetClassDevs,SetupDiEnumDeviceInfo和SetupDiGetDeviceRegistryProperty来完成SetupDiDestroyDeviceInfoList。
但!我导入setupapi.dll并声明了其中的三个函数——没问题。然后我发现SetupDiGetDeviceRegistryProperty根本不在 DLL 中,只能与setupapi.lib. 有什么办法可以代替这个功能吗?
我无法使用 WMI。