Jump to content
YOUR-AD-HERE
HOSTING
TOOLS

Locked Obtener Procesador [C/C++]


Expermicid

Recommended Posts

Pequeño code para obtener el procesador de la PC. :)

 

[lenguaje=java]#include

#include

 

using namespace std;

 

void main() {

char *sTemp;

DWORD bytesread;

HKEY hkey;

 

if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", 0, KEY_READ, &hkey) == ERROR_SUCCESS) {

if (RegQueryValueEx(hkey, "ProcessorNameString", 0, 0, 0, &bytesread) == ERROR_SUCCESS) {

sTemp = (char *)malloc(bytesread);

if (RegQueryValueEx(hkey, "ProcessorNameString", 0, 0, (LPBYTE)sTemp, &bytesread) == ERROR_SUCCESS)

cout << "Procesador --> " << sTemp << endl;

free(sTemp);

}

RegCloseKey(hkey);

}

getchar();

}[/lenguaje]

 

En funcionamiento:

 

This is the hidden content, please

 

Saludos

Edited by Expermicid
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.