One question are you looking to query for all hardware information like gpu, ram, processor type display devices , etc. for just windows or is this starting point windows. If window is the starting point and you know what hardware devices you are looking for, then maybe the best option is to use pipes and windows command line wmic like below
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <stdio.h>
...
FILE *in;
char buff[512];
if(in = _popen("wmic cpu list full)) //read the full cpu data information
{
fgets(buff, sizeof(buff), in); // clear the first for empty data
while(fgets(buff, sizeof(buff), in) != nullptr)
{
process(buff);
}
_pclose(in);
}