How to get memory range used by a specific device with WMI (Windows Management Instrumentation)

别等时光非礼了梦想. 提交于 2019-12-13 07:23:01

问题


How can I get the resources used by a specific device (in particular, the memory range) of a specific device knowing it's name and/or DeviceID and/or the Pci bus number, Device number and function number? For example, I want to know what memory range an Intel AHCI Controller uses. With the query "SELECT * FROM Win32_IDEController WHERE Name LIKE\"%ahci%\"" I can get some info like the complete name, device id, and other informations. Then I thought that using the complete name or device id I could select the memory range used by the device using the class "Win32_DeviceMemoryAddress". However, this class does not have any useful attributes that I can set to get the memory range associated with the AHCI controller. Name, Caption and description all return a string with the starting address and ending address.

Thanks in advance.


回答1:


Don't know how to do it with WMI, but in this link, under "Get Device Resource", the author claims that CM_Get_Next_Res_Des provides this information. Getting there, though, is not simple... that's exactly what I'm trying to accomplish right now... will contribute further details when I get there...



来源:https://stackoverflow.com/questions/15845307/how-to-get-memory-range-used-by-a-specific-device-with-wmi-windows-management-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!