Get the graphics card model?

meds picture meds · Jul 7, 2009 · Viewed 14.1k times · Source

I was wondering how I can get the graphics card model/brand from code particularly from DirectX 9.0c (from within C++ code).

Answer

JustinB picture JustinB · Apr 3, 2012

The easiest way in DirectX is through IDirect3D9::GetAdapterIdentifier.

Just create a D3DADAPTER_IDENTIFIER9 object, pass a pointer to it to GetAdapterIdentifier. DirectX fills out the graphics card description as a string in the Description field. It also includes information on which display device the card is, and what driver version you have.

You get something like this:

  • Description: "NVIDIA GeForce GTX 570"
  • Device: "\.\DISPLAY1"
  • Driver: "nvd3dum.dll"