Para Aquellas Personas que lo necesitan
aca este es el codigo
#include <windows.h>
HKEY hkey, hNetKey ;
DWORD lenKeyValue;
unsigned long DataType;
int err;
long lResult = 0;
char *szData,szData1[256];
if(RegOpenKey(HKEY_LOCAL_MACHINE,"System\\CurrentControlSet\\control\\ComputerName\\ComputerName", &hNetKey) == ERROR_SUCCESS)
{
lResult = RegQueryValueEx(hNetKey,"Computername", 0, NULL, (LPBYTE)&szData1,(LPDWORD)&size);
MessageBox(NULL,szData1,"",0);
RegCloseKey(hNetKey);
}