Any of these solutions work for me, first I tried a system management code to try to find the name of the gpu and cpu, but of that error for me in visual studio, the compiler does not seem to accept the clr, and I'm using qt in the project with the 64bit msvs2017 compiler.
Gravidade Código Descrição Projeto Arquivo Linha Estado de Supressão
Erro D8016 opções de linha de comando '/clr' e '/EHs' são incompatíveis Denoiser C:\Git\Denoiser-Script\src\cl 1
Another problem is that the api itself does not identify the cpu name or gpu, so I did not find what I wanted. So what would be the solution?
code that I used
using namespace System;
using namespace System::Management;
void printHardwareInfo(String^ HardwareClass, String^ propetyName)
{
ManagementObjectSearcher^ searcher = gcnew ManagementObjectSearcher("root\CIMV2", "SELECT * FROM" + HardwareClass);
ManagementObjectCollection^ collection = searcher->Get();
for each (ManagementObjectSearcher^ object in collection)
{
Console::WriteLine(object[propetyName]->ToString());
}
}