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.Answer1:
Don't know how to do it with
WMI, but in <a href="http://www.codeproject.com/Articles/14412/Enumerating-windows-device" rel="nofollow">this link</a>, under "Get Device Resource", the author claims that <a href="http://msdn.microsoft.com/en-us/library/windows/hardware/ff538600%28v=vs.85%29.aspx" rel="nofollow">CM_Get_Next_Res_Des</a> 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...