I want to get driver version of nVidia video card. So I used WMI and get data from "DriverVersion" obejct of "Win32_VideoController" class. But it was like "9.18.13.1106"(file version) and what I wanted is something like "311.06"(treiber version). Where can I get that information? If it is impossible on WMI, I want to know other way to get that. Thanks.
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
- What uses more memory in c++? An 2 ints or 2 funct
相关文章
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
- Converting glm::lookat matrix to quaternion and ba
- What is the correct way to declare and use a FILE
You can do this using NVML from nVidia's Tesla Deployment Kit. You can retrieve the internal driver version (the one you're accustomed to seeing for an nVidia driver) with code like this:
Note that if you're writing this purely for your own use on a machine where you're free to edit the PATH, you can simplify this quite a bit. Most of the code deals with the fact that this uses
NVML.DLL
, which is in a directory that's not normally on the path, so the code loads that dynamically, and usesGetProcAddress
to find the functions in it that we need to use. In this case, we're only using three functions, so it's not all that difficult to deal with, but it still at drastically increases the length of the code.If we could ignore all that nonsense, the real code would just come out to something on this general order:
Anyway, to build it, you'll need a command line something like:
...assuming you've installed the Tesla Deployment Kit at
c:\tdk
.In any case, yes, I've tested this to at least some degree. On my desktop it prints out:
...which matches what I have installed.