After days of searching the web (Including MSDN) for a way to get Hardware unique IDs using C++, I found that I need to use WMI. Actually I could find some good examples as well like this one. The problem is: I cannot compile it using MinGW however it rund pretty well on Visual Studio using Microsoft compiler, but with MinGW (which my application is compiled with) it gives me dozens of errors. This could sound an old question but unfortunately I couldn't find a solution so far after days of searching the web. I am using MinGW on Windows 7.
相关问题
- 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
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- 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
MinGW should allow you to access the Win32 api's without needing Visual Studio.
The following should compile and run with MinGW.
Additional reading to help you get started.
MinGW has no support for WMI. There are some efforts in MinGW64 but it still can't be called complete (for example, wbemuuid.lib is missed).
Some projects solve this problem by extending MinGW with missed WMI libraries from Microsoft WMI SDK or MinGW64 (see this project or this thread for examples).
Another solution for getting device UIDs for your concrete task may be using of Windows Setup API that is well supported by MinGW. A great example of using it may be found on CodeProject site.
Check out the Microsoft Reference
Win API System Information