tags:

views:

592

answers:

2

Hi everyone!

I'd like to know how to extract GPU using C++. However, the information that I'm interested in is not the data that is available from the Win32_VideoController class (ahh.. the Murphy's Laws of Programming). Specifically, I'm interested in the (Memory and Shader clocks).

I'd like to know how to get at that information.

I'd like to avoid DirectX querying if possible, due to my lack of knowledge (in fact, zero :P) about it. However, should that be the easiest way, then I'm willing to take a shot at it. Any links/tutorials would be greatly appreciated.

Thanks

+1  A: 

I think you want to use the SetupAPI facility that comes with Windows. It lets you enumerate devices and drivers. I've used it to enumerate GPU hardware, driver versions, etc. Here's a link:

http://msdn.microsoft.com/en-us/library/ms792983.aspx

boiler96
Thanks for your reply! I'll give it a try and I'll let you know if it worked.
Alrighty, I took a look through the MSDN, and I decided to try it out.I wrote up a simple int main program to just print out a simple string. However, I now added the include : #include <setupapi.h>When I add that, I get a compiler error:1>c:\program files\microsoft sdks\windows\v6.0a\include\setupapi.h(60) : error C2143: syntax error: missing ';' before '*'1>c:\program files\microsoft sdks\windows\v6.0a\include\setupapi.h(60) : error C4430: missing type specifier-int assumed. Note: C++ does not support default-int1>c:\program files\microsoft sdks\windows\v6.0a\include\setupapi.h
A: 

Hi!

I've been playing with this setupapi for a while, however, I don't see how to get clock speeds from that (I managed to fix my above problem as well).

Could you please elaborate on how to do it?

So far, I believe I have successfully created the infoset, obtained the deviceID, input the device info into the infoset. However, I don't know how to create the structure to put the information in.

Also, I looked around at some examples, like this one: http://www.codeproject.com/KB/system/DevMgr.aspx

but it didn't seem to measure the clock speeds, which leads me to think that it's not possible?

Thanks again