Changeset 2984 for trunk/src/kernel32/cpu.cpp
- Timestamp:
- Mar 3, 2000, 12:16:00 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/cpu.cpp
r2802 r2984 1 /* $Id: cpu.cpp,v 1. 6 2000-02-16 14:25:36sandervl Exp $ */1 /* $Id: cpu.cpp,v 1.7 2000-03-03 11:15:57 sandervl Exp $ */ 2 2 /* 3 3 * Odin win32 CPU apis … … 21 21 #include "debugtools.h" 22 22 #include <cpuhlp.h> 23 #include "initsystem.h"24 23 25 24 #define DBG_LOCALLOG DBG_cpu … … 102 101 103 102 /* Create this registry key for all systems */ 104 if ( ADVAPI32_RegCreateKeyA(HKEY_LOCAL_MACHINE,"HARDWARE\\DESCRIPTION\\System\\CentralProcessor",&hkey)!=ERROR_SUCCESS) {103 if (RegCreateKeyA(HKEY_LOCAL_MACHINE,"HARDWARE\\DESCRIPTION\\System\\CentralProcessor",&hkey)!=ERROR_SUCCESS) { 105 104 dprintf(("Unable to register CPU information\n")); 106 105 } … … 113 112 sprintf(buf,"%d",i); 114 113 if (xhkey) 115 ADVAPI32_RegCloseKey(xhkey);116 ADVAPI32_RegCreateKeyA(hkey,buf,&xhkey);114 RegCloseKey(xhkey); 115 RegCreateKeyA(hkey,buf,&xhkey); 117 116 118 117 signature = GetCPUSignature(); … … 137 136 sprintf(buf,"CPU %ld",cachedsi.dwProcessorType); 138 137 if (xhkey) { 139 ADVAPI32_RegSetValueExA(xhkey,"Identifier",0,REG_SZ,(LPBYTE)buf,strlen(buf));138 RegSetValueExA(xhkey,"Identifier",0,REG_SZ,(LPBYTE)buf,strlen(buf)); 140 139 memset(buf, 0, sizeof(buf)); 141 140 GetCPUVendorString(buf); 142 ADVAPI32_RegSetValueExA(xhkey,"VendorIdentifier",0,REG_SZ,(LPBYTE)buf,strlen(buf));141 RegSetValueExA(xhkey,"VendorIdentifier",0,REG_SZ,(LPBYTE)buf,strlen(buf)); 143 142 } 144 143 cachedsi.wProcessorRevision = signature & 0xf; … … 162 161 if (features & CPUID_FPU_PRESENT) { 163 162 if (i == 0) { 164 if( ADVAPI32_RegCreateKeyA(HKEY_LOCAL_MACHINE,"HARDWARE\\DESCRIPTION\\System\\FloatingPointProcessor",&fpukey)!=ERROR_SUCCESS)163 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"HARDWARE\\DESCRIPTION\\System\\FloatingPointProcessor",&fpukey)!=ERROR_SUCCESS) 165 164 dprintf(("Unable to register FPU information\n")); 166 165 } … … 168 167 if(fpukey) { 169 168 sprintf(buf,"%d",i); 170 ADVAPI32_RegCreateKeyA(fpukey,buf,&xhfpukey);169 RegCreateKeyA(fpukey,buf,&xhfpukey); 171 170 } 172 171 } … … 177 176 178 177 if (xhkey) 179 ADVAPI32_RegCloseKey(xhkey);178 RegCloseKey(xhkey); 180 179 if (hkey) 181 ADVAPI32_RegCloseKey(hkey);180 RegCloseKey(hkey); 182 181 if (xhfpukey) 183 ADVAPI32_RegCloseKey(xhfpukey);182 RegCloseKey(xhfpukey); 184 183 if (fpukey) 185 ADVAPI32_RegCloseKey(fpukey);184 RegCloseKey(fpukey); 186 185 187 186 }
Note:
See TracChangeset
for help on using the changeset viewer.