AutoBotAM
AutoBotAM

Reputation: 1555

How do I get access to system specs via the Windows API?

How do I access information about the computer's specifications from the Windows API? Do I need to look in the registry, if so where? Some key information I would like my programs to have access to are the graphics card model and specs, supported versions of OpenGL and DirectX, supported screen resolutions, CPU information, total/available disk space, and RAM information, among others. What types of efficient methods can I use to access this information in Win32?

Advice is greatly appreciated!

Upvotes: 1

Views: 1421

Answers (1)

Hans Passant
Hans Passant

Reputation: 942109

All of this info, and much more, is exposed in Windows through WMI (Windows Management Instrumentation). A good starting point to discover queries and try them out on your machine is the WMI Code Creator tool. It generates code too but not C++ code. That's fairly ugly but boilerplate, look here for code samples. The set of standard Win32 WMI classes is documented here.

Upvotes: 1

Related Questions