Although probably not the answer you're looking for (i.e. directly interrogating the CPU), you can fetch the "ProcessorNameString" value from the Windows Registry using code like the following:
#define BUFSIZ 64 // For easy adjustment of limits, if required
char answer[BUFSIZ] = "Error Reading CPU Name from Registry!", inBuffer[BUFSIZ] = "";
const char *csName = "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
HKEY hKey; DWORD gotType, gotSize = BUFSIZ;
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, csName, 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
if (!RegQueryValueExA(hKey, "ProcessorNameString", nullptr, &gotType, (PBYTE)(inBuffer), &gotSize)) {
if ((gotType == REG_SZ) && strlen(inBuffer)) strcpy(answer, inBuffer);
}
RegCloseKey(hKey);
}
This will (or should) give you the processor's 'name' that the Windows system sees! I don't have access to an ARM64
system, so I can't properly test it but, on my x64
system, I get the following (correct) string: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
(which is exactly that returned by using __cpuid()
calls to get the "Brand String").
However, like you, I would be very interested to know of a way to do this directly - i.e., how would the Windows O/S get this info on an ARM64
system?