SHOW:
|
|
- or go back to the newest paste.
| 1 | - | public class Processor |
| 1 | + | using System; |
| 2 | using System.Management; | |
| 3 | ||
| 4 | namespace WMISharp | |
| 5 | {
| |
| 6 | /* | |
| 7 | * Pulled " public Int16 PowerManagementCapabilities[]; " for now | |
| 8 | - | public Int32 CurrentClockSpeed; |
| 8 | + | */ |
| 9 | public class Processor | |
| 10 | {
| |
| 11 | public DateTime InstallDate; | |
| 12 | public Boolean ConfigManagerUserConfig; | |
| 13 | public Boolean PowerManagementSupported; | |
| 14 | public Boolean ErrorCleared; | |
| 15 | ||
| 16 | public Int32 ConfigManagerErrorCode; | |
| 17 | public Int32 ExtClock; | |
| 18 | public Int32 L2CacheSize; | |
| 19 | public Int32 L2CacheSpeed; | |
| 20 | public Int32 L3CacheSize; | |
| 21 | public Int32 L3CacheSpeed; | |
| 22 | - | public Int16 CpuStatus; |
| 22 | + | |
| 23 | - | public Int16 CurrentVoltage; |
| 23 | + | |
| 24 | public Int32 NumberOfCores; | |
| 25 | public Int32 NumberOfLogicalProcessors; | |
| 26 | public Int32 VoltageCaps; | |
| 27 | - | public Int16 LoadPercentage; |
| 27 | + | |
| 28 | public Int16 AddressWidth; | |
| 29 | public Int16 Architecture; | |
| 30 | - | public Int16 StatusInfo; |
| 30 | + | |
| 31 | public Int16 DataWidth; | |
| 32 | public Int16 Family; | |
| 33 | public Int16 Level; | |
| 34 | public Int16 ProcessorType; | |
| 35 | public Int16 Revision; | |
| 36 | public Int16 UpgradeMethod; | |
| 37 | ||
| 38 | public String Caption; | |
| 39 | public String CreationClassName; | |
| 40 | public String Description; | |
| 41 | public String DeviceID; | |
| 42 | public String ErrorDescription; | |
| 43 | public String Manufacturer; | |
| 44 | public String Name; | |
| 45 | public String OtherFamilyDescription; | |
| 46 | public String PNPDeviceID; | |
| 47 | public String ProcessorId; | |
| 48 | public String Role; | |
| 49 | public String SocketDesignation; | |
| 50 | public String Status; | |
| 51 | public String Stepping; | |
| 52 | public String SystemCreationClassName; | |
| 53 | public String SystemName; | |
| 54 | public String UniqueId; | |
| 55 | public String Version; | |
| 56 | ||
| 57 | public String Str_Architecture; | |
| 58 | public String Str_Availability; | |
| 59 | public String Str_ConfigManagerErrorCode; | |
| 60 | - | CurrentClockSpeed = Convert.ToInt32(obj["CurrentClockSpeed"]); |
| 60 | + | public String Str_CpuStatus; |
| 61 | public String Str_Family; | |
| 62 | public String Str_ProcessorType; | |
| 63 | public String Str_StatusInfo; | |
| 64 | public String Str_UpgradeMethod; | |
| 65 | public String Str_VoltageCaps; | |
| 66 | ||
| 67 | public Int32 CurrentClockSpeed | |
| 68 | {
| |
| 69 | get | |
| 70 | {
| |
| 71 | Int32 RetVal = 0; | |
| 72 | ||
| 73 | foreach (ManagementObject obj in new ManagementObjectSearcher("SELECT * FROM Win32_Processor").Get())
| |
| 74 | - | CpuStatus = Convert.ToInt16(obj["CpuStatus"]); |
| 74 | + | {
|
| 75 | - | CurrentVoltage = Convert.ToInt16(obj["CurrentVoltage"]); |
| 75 | + | RetVal = Convert.ToInt32(obj["CurrentClockSpeed"]); |
| 76 | } | |
| 77 | ||
| 78 | return RetVal; | |
| 79 | - | LoadPercentage = Convert.ToInt16(obj["LoadPercentage"]); |
| 79 | + | |
| 80 | } | |
| 81 | ||
| 82 | - | StatusInfo = Convert.ToInt16(obj["StatusInfo"]); |
| 82 | + | public Int16 CpuStatus |
| 83 | {
| |
| 84 | get | |
| 85 | {
| |
| 86 | Int16 RetVal = 0; | |
| 87 | ||
| 88 | foreach (ManagementObject obj in new ManagementObjectSearcher("SELECT * FROM Win32_Processor").Get())
| |
| 89 | {
| |
| 90 | RetVal = Convert.ToInt16(obj["CpuStatus"]); | |
| 91 | } | |
| 92 | ||
| 93 | return RetVal; | |
| 94 | } | |
| 95 | } | |
| 96 | ||
| 97 | public Int16 CurrentVoltage | |
| 98 | {
| |
| 99 | get | |
| 100 | {
| |
| 101 | Int16 RetVal = 0; | |
| 102 | ||
| 103 | foreach (ManagementObject obj in new ManagementObjectSearcher("SELECT * FROM Win32_Processor").Get())
| |
| 104 | - | } |
| 104 | + | {
|
| 105 | RetVal = Convert.ToInt16(obj["CurrentVoltage"]); | |
| 106 | } | |
| 107 | ||
| 108 | return RetVal; | |
| 109 | } | |
| 110 | } | |
| 111 | ||
| 112 | public Int16 LoadPercentage | |
| 113 | {
| |
| 114 | get | |
| 115 | {
| |
| 116 | Int16 RetVal = 0; | |
| 117 | ||
| 118 | foreach (ManagementObject obj in new ManagementObjectSearcher("SELECT * FROM Win32_Processor").Get())
| |
| 119 | {
| |
| 120 | RetVal = Convert.ToInt16(obj["LoadPercentage"]); | |
| 121 | } | |
| 122 | ||
| 123 | return RetVal; | |
| 124 | } | |
| 125 | } | |
| 126 | ||
| 127 | public Int16 StatusInfo | |
| 128 | {
| |
| 129 | get | |
| 130 | {
| |
| 131 | Int16 RetVal = 0; | |
| 132 | ||
| 133 | foreach (ManagementObject obj in new ManagementObjectSearcher("SELECT * FROM Win32_Processor").Get())
| |
| 134 | {
| |
| 135 | RetVal = Convert.ToInt16(obj["StatusInfo"]); | |
| 136 | } | |
| 137 | ||
| 138 | return RetVal; | |
| 139 | } | |
| 140 | } | |
| 141 | ||
| 142 | ||
| 143 | public Processor() | |
| 144 | {
| |
| 145 | foreach (ManagementObject obj in new ManagementObjectSearcher("SELECT * FROM Win32_Processor").Get())
| |
| 146 | {
| |
| 147 | InstallDate = Convert.ToDateTime(obj["InstallDate"]); | |
| 148 | ConfigManagerUserConfig = Convert.ToBoolean(obj["ConfigManagerUserConfig"]); | |
| 149 | PowerManagementSupported = Convert.ToBoolean(obj["PowerManagementSupported"]); | |
| 150 | ErrorCleared = Convert.ToBoolean(obj["ErrorCleared"]); | |
| 151 | ConfigManagerErrorCode = Convert.ToInt32(obj["ConfigManagerErrorCode"]); | |
| 152 | ExtClock = Convert.ToInt32(obj["ExtClock"]); | |
| 153 | L2CacheSize = Convert.ToInt32(obj["L2CacheSize"]); | |
| 154 | L2CacheSpeed = Convert.ToInt32(obj["L2CacheSpeed"]); | |
| 155 | L3CacheSize = Convert.ToInt32(obj["L3CacheSize"]); | |
| 156 | L3CacheSpeed = Convert.ToInt32(obj["L3CacheSpeed"]); | |
| 157 | LastErrorCode = Convert.ToInt32(obj["LastErrorCode"]); | |
| 158 | MaxClockSpeed = Convert.ToInt32(obj["MaxClockSpeed"]); | |
| 159 | NumberOfCores = Convert.ToInt32(obj["NumberOfCores"]); | |
| 160 | NumberOfLogicalProcessors = Convert.ToInt32(obj["NumberOfLogicalProcessors"]); | |
| 161 | VoltageCaps = Convert.ToInt32(obj["VoltageCaps"]); | |
| 162 | AddressWidth = Convert.ToInt16(obj["AddressWidth"]); | |
| 163 | Architecture = Convert.ToInt16(obj["Architecture"]); | |
| 164 | Availability = Convert.ToInt16(obj["Availability"]); | |
| 165 | DataWidth = Convert.ToInt16(obj["DataWidth"]); | |
| 166 | Family = Convert.ToInt16(obj["Family"]); | |
| 167 | Level = Convert.ToInt16(obj["Level"]); | |
| 168 | ProcessorType = Convert.ToInt16(obj["ProcessorType"]); | |
| 169 | Revision = Convert.ToInt16(obj["Revision"]); | |
| 170 | UpgradeMethod = Convert.ToInt16(obj["UpgradeMethod"]); | |
| 171 | Caption = Convert.ToString(obj["Caption"]); | |
| 172 | CreationClassName = Convert.ToString(obj["CreationClassName"]); | |
| 173 | Description = Convert.ToString(obj["Description"]); | |
| 174 | DeviceID = Convert.ToString(obj["DeviceID"]); | |
| 175 | ErrorDescription = Convert.ToString(obj["ErrorDescription"]); | |
| 176 | Manufacturer = Convert.ToString(obj["Manufacturer"]); | |
| 177 | Name = Convert.ToString(obj["Name"]); | |
| 178 | OtherFamilyDescription = Convert.ToString(obj["OtherFamilyDescription"]); | |
| 179 | PNPDeviceID = Convert.ToString(obj["PNPDeviceID"]); | |
| 180 | ProcessorId = Convert.ToString(obj["ProcessorId"]); | |
| 181 | Role = Convert.ToString(obj["Role"]); | |
| 182 | SocketDesignation = Convert.ToString(obj["SocketDesignation"]); | |
| 183 | Status = Convert.ToString(obj["Status"]); | |
| 184 | Stepping = Convert.ToString(obj["Stepping"]); | |
| 185 | SystemCreationClassName = Convert.ToString(obj["SystemCreationClassName"]); | |
| 186 | SystemName = Convert.ToString(obj["SystemName"]); | |
| 187 | UniqueId = Convert.ToString(obj["UniqueId"]); | |
| 188 | Version = Convert.ToString(obj["Version"]); | |
| 189 | } | |
| 190 | ||
| 191 | #region Architecture String | |
| 192 | ||
| 193 | if (Architecture == 0) | |
| 194 | {
| |
| 195 | Str_Architecture = "x86"; | |
| 196 | } | |
| 197 | else if (Architecture == 1) | |
| 198 | {
| |
| 199 | Str_Architecture = "MIPS"; | |
| 200 | } | |
| 201 | else if (Architecture == 2) | |
| 202 | {
| |
| 203 | Str_Architecture = "Alpha"; | |
| 204 | } | |
| 205 | else if (Architecture == 3) | |
| 206 | {
| |
| 207 | Str_Architecture = "PowerPC"; | |
| 208 | } | |
| 209 | else if (Architecture == 5) | |
| 210 | {
| |
| 211 | Str_Architecture = "ARM"; | |
| 212 | } | |
| 213 | else if (Architecture == 6) | |
| 214 | {
| |
| 215 | Str_Architecture = "Itanium-based systems"; | |
| 216 | } | |
| 217 | else if (Architecture == 9) | |
| 218 | {
| |
| 219 | Str_Architecture = "x64"; | |
| 220 | } | |
| 221 | ||
| 222 | #endregion | |
| 223 | ||
| 224 | #region Availability String | |
| 225 | ||
| 226 | if (Availability == 1) | |
| 227 | {
| |
| 228 | Str_Availability = "Other"; | |
| 229 | } | |
| 230 | else if (Availability == 2) | |
| 231 | {
| |
| 232 | Str_Availability = "Unknown"; | |
| 233 | } | |
| 234 | else if (Availability == 3) | |
| 235 | {
| |
| 236 | Str_Availability = "Running or Full Power"; | |
| 237 | } | |
| 238 | else if (Availability == 4) | |
| 239 | {
| |
| 240 | Str_Availability = "Warning"; | |
| 241 | } | |
| 242 | else if (Availability == 5) | |
| 243 | {
| |
| 244 | Str_Availability = "In Test"; | |
| 245 | } | |
| 246 | else if (Availability == 6) | |
| 247 | {
| |
| 248 | Str_Availability = "Not Applicable"; | |
| 249 | } | |
| 250 | else if (Availability == 7) | |
| 251 | {
| |
| 252 | Str_Availability = "Power Off"; | |
| 253 | } | |
| 254 | else if (Availability == 8) | |
| 255 | {
| |
| 256 | Str_Availability = "Off Line"; | |
| 257 | } | |
| 258 | else if (Availability == 9) | |
| 259 | {
| |
| 260 | Str_Availability = "Off Duty"; | |
| 261 | } | |
| 262 | else if (Availability == 10) | |
| 263 | {
| |
| 264 | Str_Availability = "Degraded"; | |
| 265 | } | |
| 266 | else if (Availability == 11) | |
| 267 | {
| |
| 268 | Str_Availability = "Not Installed"; | |
| 269 | } | |
| 270 | else if (Availability == 12) | |
| 271 | {
| |
| 272 | Str_Availability = "Install Error"; | |
| 273 | } | |
| 274 | else if (Availability == 13) | |
| 275 | {
| |
| 276 | Str_Availability = "Power Save - Unknown"; | |
| 277 | } | |
| 278 | else if (Availability == 14) | |
| 279 | {
| |
| 280 | Str_Availability = "Power Save - Low Power Mode"; | |
| 281 | } | |
| 282 | else if (Availability == 15) | |
| 283 | {
| |
| 284 | Str_Availability = "Power Save - Standby"; | |
| 285 | } | |
| 286 | else if (Availability == 16) | |
| 287 | {
| |
| 288 | Str_Availability = "Power Cycle"; | |
| 289 | } | |
| 290 | else if (Availability == 17) | |
| 291 | {
| |
| 292 | Str_Availability = "Power Save - Warning"; | |
| 293 | } | |
| 294 | ||
| 295 | #endregion | |
| 296 | ||
| 297 | #region ConfigManagerErrorCode String | |
| 298 | ||
| 299 | if (ConfigManagerErrorCode == 0) | |
| 300 | {
| |
| 301 | Str_ConfigManagerErrorCode = "Device is working properly."; | |
| 302 | } | |
| 303 | else if (ConfigManagerErrorCode == 1) | |
| 304 | {
| |
| 305 | Str_ConfigManagerErrorCode = "Device is not configured correctly."; | |
| 306 | } | |
| 307 | else if (ConfigManagerErrorCode == 2) | |
| 308 | {
| |
| 309 | Str_ConfigManagerErrorCode = "Windows cannot load the driver for this device."; | |
| 310 | } | |
| 311 | else if (ConfigManagerErrorCode == 3) | |
| 312 | {
| |
| 313 | Str_ConfigManagerErrorCode = "Driver for this device might be corrupted or the system may be low on memory or other resources."; | |
| 314 | } | |
| 315 | else if (ConfigManagerErrorCode == 4) | |
| 316 | {
| |
| 317 | Str_ConfigManagerErrorCode = "Device is not working properly. One of its drivers or the registry might be corrupted."; | |
| 318 | } | |
| 319 | else if (ConfigManagerErrorCode == 5) | |
| 320 | {
| |
| 321 | Str_ConfigManagerErrorCode = "Driver for the device requires a resource that Windows cannot manage."; | |
| 322 | } | |
| 323 | else if (ConfigManagerErrorCode == 6) | |
| 324 | {
| |
| 325 | Str_ConfigManagerErrorCode = "Boot configuration for the device conflicts with other devices."; | |
| 326 | } | |
| 327 | else if (ConfigManagerErrorCode == 7) | |
| 328 | {
| |
| 329 | Str_ConfigManagerErrorCode = "Cannot filter."; | |
| 330 | } | |
| 331 | else if (ConfigManagerErrorCode == 8) | |
| 332 | {
| |
| 333 | Str_ConfigManagerErrorCode = "Driver loader for the device is missing."; | |
| 334 | } | |
| 335 | else if (ConfigManagerErrorCode == 9) | |
| 336 | {
| |
| 337 | Str_ConfigManagerErrorCode = "Device is not working properly. The controlling firmware is incorrectly reporting the resources for the device."; | |
| 338 | } | |
| 339 | else if (ConfigManagerErrorCode == 10) | |
| 340 | {
| |
| 341 | Str_ConfigManagerErrorCode = "Device cannot start."; | |
| 342 | } | |
| 343 | else if (ConfigManagerErrorCode == 11) | |
| 344 | {
| |
| 345 | Str_ConfigManagerErrorCode = "Device failed."; | |
| 346 | } | |
| 347 | else if (ConfigManagerErrorCode == 12) | |
| 348 | {
| |
| 349 | Str_ConfigManagerErrorCode = "Device cannot find enough free resources to use."; | |
| 350 | } | |
| 351 | else if (ConfigManagerErrorCode == 13) | |
| 352 | {
| |
| 353 | Str_ConfigManagerErrorCode = "Windows cannot verify the device's resources."; | |
| 354 | } | |
| 355 | else if (ConfigManagerErrorCode == 14) | |
| 356 | {
| |
| 357 | Str_ConfigManagerErrorCode = "Device cannot work properly until the computer is restarted."; | |
| 358 | } | |
| 359 | else if (ConfigManagerErrorCode == 15) | |
| 360 | {
| |
| 361 | Str_ConfigManagerErrorCode = "Device is not working properly due to a possible re-enumeration problem."; | |
| 362 | } | |
| 363 | else if (ConfigManagerErrorCode == 16) | |
| 364 | {
| |
| 365 | Str_ConfigManagerErrorCode = "Windows cannot identify all of the resources that the device uses."; | |
| 366 | } | |
| 367 | else if (ConfigManagerErrorCode == 17) | |
| 368 | {
| |
| 369 | Str_ConfigManagerErrorCode = "Device is requesting an unknown resource type."; | |
| 370 | } | |
| 371 | else if (ConfigManagerErrorCode == 18) | |
| 372 | {
| |
| 373 | Str_ConfigManagerErrorCode = "Device drivers must be reinstalled."; | |
| 374 | } | |
| 375 | else if (ConfigManagerErrorCode == 19) | |
| 376 | {
| |
| 377 | Str_ConfigManagerErrorCode = "Failure using the VxD loader."; | |
| 378 | } | |
| 379 | else if (ConfigManagerErrorCode == 20) | |
| 380 | {
| |
| 381 | Str_ConfigManagerErrorCode = "Registry might be corrupted."; | |
| 382 | } | |
| 383 | else if (ConfigManagerErrorCode == 21) | |
| 384 | {
| |
| 385 | Str_ConfigManagerErrorCode = "System failure. If changing the device driver is ineffective, see the hardware documentation. Windows is removing the device."; | |
| 386 | } | |
| 387 | else if (ConfigManagerErrorCode == 22) | |
| 388 | {
| |
| 389 | Str_ConfigManagerErrorCode = "Device is disabled."; | |
| 390 | } | |
| 391 | else if (ConfigManagerErrorCode == 23) | |
| 392 | {
| |
| 393 | Str_ConfigManagerErrorCode = "System failure. If changing the device driver is ineffective, see the hardware documentation."; | |
| 394 | } | |
| 395 | else if (ConfigManagerErrorCode == 24) | |
| 396 | {
| |
| 397 | Str_ConfigManagerErrorCode = "Device is not present, not working properly, or does not have all of its drivers installed."; | |
| 398 | } | |
| 399 | else if (ConfigManagerErrorCode == 25) | |
| 400 | {
| |
| 401 | Str_ConfigManagerErrorCode = "Windows is still setting up the device."; | |
| 402 | } | |
| 403 | else if (ConfigManagerErrorCode == 26) | |
| 404 | {
| |
| 405 | Str_ConfigManagerErrorCode = "Windows is still setting up the device."; | |
| 406 | } | |
| 407 | else if (ConfigManagerErrorCode == 27) | |
| 408 | {
| |
| 409 | Str_ConfigManagerErrorCode = "Device does not have valid log configuration."; | |
| 410 | } | |
| 411 | else if (ConfigManagerErrorCode == 28) | |
| 412 | {
| |
| 413 | Str_ConfigManagerErrorCode = "Device drivers are not installed."; | |
| 414 | } | |
| 415 | else if (ConfigManagerErrorCode == 29) | |
| 416 | {
| |
| 417 | Str_ConfigManagerErrorCode = "Device is disabled. The device firmware did not provide the required resources."; | |
| 418 | } | |
| 419 | else if (ConfigManagerErrorCode == 30) | |
| 420 | {
| |
| 421 | Str_ConfigManagerErrorCode = "Device is using an IRQ resource that another device is using."; | |
| 422 | } | |
| 423 | else if (ConfigManagerErrorCode == 31) | |
| 424 | {
| |
| 425 | Str_ConfigManagerErrorCode = "Device is not working properly. Windows cannot load the required device drivers."; | |
| 426 | } | |
| 427 | ||
| 428 | #endregion | |
| 429 | ||
| 430 | #region CpuStatus String | |
| 431 | ||
| 432 | if (CpuStatus == 0) | |
| 433 | {
| |
| 434 | Str_CpuStatus = "Unknown"; | |
| 435 | } | |
| 436 | else if (CpuStatus == 1) | |
| 437 | {
| |
| 438 | Str_CpuStatus = "CPU Enabled"; | |
| 439 | } | |
| 440 | else if (CpuStatus == 2) | |
| 441 | {
| |
| 442 | Str_CpuStatus = "CPU Disabled by User via BIOS Setup"; | |
| 443 | } | |
| 444 | else if (CpuStatus == 3) | |
| 445 | {
| |
| 446 | Str_CpuStatus = "CPU Disabled by BIOS (POST Error)"; | |
| 447 | } | |
| 448 | else if (CpuStatus == 4) | |
| 449 | {
| |
| 450 | Str_CpuStatus = "CPU Is Idle"; | |
| 451 | } | |
| 452 | else if (CpuStatus == 5) | |
| 453 | {
| |
| 454 | Str_CpuStatus = "Reserved"; | |
| 455 | } | |
| 456 | else if (CpuStatus == 6) | |
| 457 | {
| |
| 458 | Str_CpuStatus = "Reserved"; | |
| 459 | } | |
| 460 | else if (CpuStatus == 7) | |
| 461 | {
| |
| 462 | Str_CpuStatus = "Other"; | |
| 463 | } | |
| 464 | ||
| 465 | #endregion | |
| 466 | ||
| 467 | #region Family String | |
| 468 | ||
| 469 | if (Family == 1) | |
| 470 | {
| |
| 471 | Str_Family = "Other"; | |
| 472 | } | |
| 473 | else if (Family == 2) | |
| 474 | {
| |
| 475 | Str_Family = "Unknown"; | |
| 476 | } | |
| 477 | else if (Family == 3) | |
| 478 | {
| |
| 479 | Str_Family = "8086"; | |
| 480 | } | |
| 481 | else if (Family == 4) | |
| 482 | {
| |
| 483 | Str_Family = "80286"; | |
| 484 | } | |
| 485 | else if (Family == 5) | |
| 486 | {
| |
| 487 | Str_Family = "Intel386™ Processor"; | |
| 488 | } | |
| 489 | else if (Family == 6) | |
| 490 | {
| |
| 491 | Str_Family = "Intel486™ Processor"; | |
| 492 | } | |
| 493 | else if (Family == 7) | |
| 494 | {
| |
| 495 | Str_Family = "8087"; | |
| 496 | } | |
| 497 | else if (Family == 8) | |
| 498 | {
| |
| 499 | Str_Family = "80287"; | |
| 500 | } | |
| 501 | else if (Family == 9) | |
| 502 | {
| |
| 503 | Str_Family = "80387"; | |
| 504 | } | |
| 505 | else if (Family == 10) | |
| 506 | {
| |
| 507 | Str_Family = "80487"; | |
| 508 | } | |
| 509 | else if (Family == 11) | |
| 510 | {
| |
| 511 | Str_Family = "Pentium Brand"; | |
| 512 | } | |
| 513 | else if (Family == 12) | |
| 514 | {
| |
| 515 | Str_Family = "Pentium Pro"; | |
| 516 | } | |
| 517 | else if (Family == 13) | |
| 518 | {
| |
| 519 | Str_Family = "Pentium II"; | |
| 520 | } | |
| 521 | else if (Family == 14) | |
| 522 | {
| |
| 523 | Str_Family = "Pentium Processor with MMX™ Technology"; | |
| 524 | } | |
| 525 | else if (Family == 15) | |
| 526 | {
| |
| 527 | Str_Family = "Celeron™"; | |
| 528 | } | |
| 529 | else if (Family == 16) | |
| 530 | {
| |
| 531 | Str_Family = "Pentium II Xeon™"; | |
| 532 | } | |
| 533 | else if (Family == 17) | |
| 534 | {
| |
| 535 | Str_Family = "Pentium III"; | |
| 536 | } | |
| 537 | else if (Family == 18) | |
| 538 | {
| |
| 539 | Str_Family = "M1 Family"; | |
| 540 | } | |
| 541 | else if (Family == 19) | |
| 542 | {
| |
| 543 | Str_Family = "M2 Family"; | |
| 544 | } | |
| 545 | else if (Family == 24) | |
| 546 | {
| |
| 547 | Str_Family = "AMD Duron™ Processor Family"; | |
| 548 | } | |
| 549 | else if (Family == 25) | |
| 550 | {
| |
| 551 | Str_Family = "K5 Family"; | |
| 552 | } | |
| 553 | else if (Family == 26) | |
| 554 | {
| |
| 555 | Str_Family = "K6 Family"; | |
| 556 | } | |
| 557 | else if (Family == 27) | |
| 558 | {
| |
| 559 | Str_Family = "K6-2"; | |
| 560 | } | |
| 561 | else if (Family == 28) | |
| 562 | {
| |
| 563 | Str_Family = "K6-3"; | |
| 564 | } | |
| 565 | else if (Family == 29) | |
| 566 | {
| |
| 567 | Str_Family = "AMD Athlon™ Processor Family"; | |
| 568 | } | |
| 569 | else if (Family == 30) | |
| 570 | {
| |
| 571 | Str_Family = "AMD2900 Family"; | |
| 572 | } | |
| 573 | else if (Family == 31) | |
| 574 | {
| |
| 575 | Str_Family = "K6-2+"; | |
| 576 | } | |
| 577 | else if (Family == 32) | |
| 578 | {
| |
| 579 | Str_Family = "Power PC Family"; | |
| 580 | } | |
| 581 | else if (Family == 33) | |
| 582 | {
| |
| 583 | Str_Family = "Power PC 601"; | |
| 584 | } | |
| 585 | else if (Family == 34) | |
| 586 | {
| |
| 587 | Str_Family = "Power PC 603"; | |
| 588 | } | |
| 589 | else if (Family == 35) | |
| 590 | {
| |
| 591 | Str_Family = "Power PC 603+"; | |
| 592 | } | |
| 593 | else if (Family == 36) | |
| 594 | {
| |
| 595 | Str_Family = "Power PC 604"; | |
| 596 | } | |
| 597 | else if (Family == 37) | |
| 598 | {
| |
| 599 | Str_Family = "Power PC 620"; | |
| 600 | } | |
| 601 | else if (Family == 38) | |
| 602 | {
| |
| 603 | Str_Family = "Power PC X704"; | |
| 604 | } | |
| 605 | else if (Family == 39) | |
| 606 | {
| |
| 607 | Str_Family = "Power PC 750"; | |
| 608 | } | |
| 609 | else if (Family == 48) | |
| 610 | {
| |
| 611 | Str_Family = "Alpha Family"; | |
| 612 | } | |
| 613 | else if (Family == 49) | |
| 614 | {
| |
| 615 | Str_Family = "Alpha 21064"; | |
| 616 | } | |
| 617 | else if (Family == 50) | |
| 618 | {
| |
| 619 | Str_Family = "Alpha 21066"; | |
| 620 | } | |
| 621 | else if (Family == 51) | |
| 622 | {
| |
| 623 | Str_Family = "Alpha 21164"; | |
| 624 | } | |
| 625 | else if (Family == 52) | |
| 626 | {
| |
| 627 | Str_Family = "Alpha 21164PC"; | |
| 628 | } | |
| 629 | else if (Family == 53) | |
| 630 | {
| |
| 631 | Str_Family = "Alpha 21164a"; | |
| 632 | } | |
| 633 | else if (Family == 54) | |
| 634 | {
| |
| 635 | Str_Family = "Alpha 21264"; | |
| 636 | } | |
| 637 | else if (Family == 55) | |
| 638 | {
| |
| 639 | Str_Family = "Alpha 21364"; | |
| 640 | } | |
| 641 | else if (Family == 64) | |
| 642 | {
| |
| 643 | Str_Family = "MIPS Family"; | |
| 644 | } | |
| 645 | else if (Family == 65) | |
| 646 | {
| |
| 647 | Str_Family = "MIPS R4000"; | |
| 648 | } | |
| 649 | else if (Family == 66) | |
| 650 | {
| |
| 651 | Str_Family = "MIPS R4200"; | |
| 652 | } | |
| 653 | else if (Family == 67) | |
| 654 | {
| |
| 655 | Str_Family = "MIPS R4400"; | |
| 656 | } | |
| 657 | else if (Family == 68) | |
| 658 | {
| |
| 659 | Str_Family = "MIPS R4600"; | |
| 660 | } | |
| 661 | else if (Family == 69) | |
| 662 | {
| |
| 663 | Str_Family = "MIPS R10000"; | |
| 664 | } | |
| 665 | else if (Family == 80) | |
| 666 | {
| |
| 667 | Str_Family = "SPARC Family"; | |
| 668 | } | |
| 669 | else if (Family == 81) | |
| 670 | {
| |
| 671 | Str_Family = "SuperSPARC"; | |
| 672 | } | |
| 673 | else if (Family == 82) | |
| 674 | {
| |
| 675 | Str_Family = "microSPARC II"; | |
| 676 | } | |
| 677 | else if (Family == 83) | |
| 678 | {
| |
| 679 | Str_Family = "microSPARC IIep"; | |
| 680 | } | |
| 681 | else if (Family == 84) | |
| 682 | {
| |
| 683 | Str_Family = "UltraSPARC"; | |
| 684 | } | |
| 685 | else if (Family == 85) | |
| 686 | {
| |
| 687 | Str_Family = "UltraSPARC II"; | |
| 688 | } | |
| 689 | else if (Family == 86) | |
| 690 | {
| |
| 691 | Str_Family = "UltraSPARC IIi"; | |
| 692 | } | |
| 693 | else if (Family == 87) | |
| 694 | {
| |
| 695 | Str_Family = "UltraSPARC III"; | |
| 696 | } | |
| 697 | else if (Family == 88) | |
| 698 | {
| |
| 699 | Str_Family = "UltraSPARC IIIi"; | |
| 700 | } | |
| 701 | else if (Family == 96) | |
| 702 | {
| |
| 703 | Str_Family = "68040"; | |
| 704 | } | |
| 705 | else if (Family == 97) | |
| 706 | {
| |
| 707 | Str_Family = "68xxx Family"; | |
| 708 | } | |
| 709 | else if (Family == 98) | |
| 710 | {
| |
| 711 | Str_Family = "68000"; | |
| 712 | } | |
| 713 | else if (Family == 99) | |
| 714 | {
| |
| 715 | Str_Family = "68010"; | |
| 716 | } | |
| 717 | else if (Family == 100) | |
| 718 | {
| |
| 719 | Str_Family = "68020"; | |
| 720 | } | |
| 721 | else if (Family == 101) | |
| 722 | {
| |
| 723 | Str_Family = "68030"; | |
| 724 | } | |
| 725 | else if (Family == 112) | |
| 726 | {
| |
| 727 | Str_Family = "Hobbit Family"; | |
| 728 | } | |
| 729 | else if (Family == 120) | |
| 730 | {
| |
| 731 | Str_Family = "Crusoe™ TM5000 Family"; | |
| 732 | } | |
| 733 | else if (Family == 121) | |
| 734 | {
| |
| 735 | Str_Family = "Crusoe™ TM3000 Family"; | |
| 736 | } | |
| 737 | else if (Family == 122) | |
| 738 | {
| |
| 739 | Str_Family = "Efficeon™ TM8000 Family"; | |
| 740 | } | |
| 741 | else if (Family == 128) | |
| 742 | {
| |
| 743 | Str_Family = "Weitek"; | |
| 744 | } | |
| 745 | else if (Family == 130) | |
| 746 | {
| |
| 747 | Str_Family = "Itanium™ Processor"; | |
| 748 | } | |
| 749 | else if (Family == 131) | |
| 750 | {
| |
| 751 | Str_Family = "AMD Athlon™ 64 Processor Family"; | |
| 752 | } | |
| 753 | else if (Family == 132) | |
| 754 | {
| |
| 755 | Str_Family = "AMD Opteron™ Processor Family"; | |
| 756 | } | |
| 757 | else if (Family == 144) | |
| 758 | {
| |
| 759 | Str_Family = "PA-RISC Family"; | |
| 760 | } | |
| 761 | else if (Family == 145) | |
| 762 | {
| |
| 763 | Str_Family = "PA-RISC 8500"; | |
| 764 | } | |
| 765 | else if (Family == 146) | |
| 766 | {
| |
| 767 | Str_Family = "PA-RISC 8000"; | |
| 768 | } | |
| 769 | else if (Family == 147) | |
| 770 | {
| |
| 771 | Str_Family = "PA-RISC 7300LC"; | |
| 772 | } | |
| 773 | else if (Family == 148) | |
| 774 | {
| |
| 775 | Str_Family = "PA-RISC 7200"; | |
| 776 | } | |
| 777 | else if (Family == 149) | |
| 778 | {
| |
| 779 | Str_Family = "PA-RISC 7100LC"; | |
| 780 | } | |
| 781 | else if (Family == 150) | |
| 782 | {
| |
| 783 | Str_Family = "PA-RISC 7100"; | |
| 784 | } | |
| 785 | else if (Family == 160) | |
| 786 | {
| |
| 787 | Str_Family = "V30 Family"; | |
| 788 | } | |
| 789 | else if (Family == 176) | |
| 790 | {
| |
| 791 | Str_Family = "Pentium III Xeon™ Processor"; | |
| 792 | } | |
| 793 | else if (Family == 177) | |
| 794 | {
| |
| 795 | Str_Family = "Pentium III Processor with Intel SpeedStep™ Technology"; | |
| 796 | } | |
| 797 | else if (Family == 178) | |
| 798 | {
| |
| 799 | Str_Family = "Pentium 4"; | |
| 800 | } | |
| 801 | else if (Family == 179) | |
| 802 | {
| |
| 803 | Str_Family = "Intel Xeon™"; | |
| 804 | } | |
| 805 | else if (Family == 180) | |
| 806 | {
| |
| 807 | Str_Family = "AS400 Family"; | |
| 808 | } | |
| 809 | else if (Family == 181) | |
| 810 | {
| |
| 811 | Str_Family = "Intel Xeon™ Processor MP"; | |
| 812 | } | |
| 813 | else if (Family == 182) | |
| 814 | {
| |
| 815 | Str_Family = "AMD Athlon™ XP Family"; | |
| 816 | } | |
| 817 | else if (Family == 183) | |
| 818 | {
| |
| 819 | Str_Family = "AMD Athlon™ MP Family"; | |
| 820 | } | |
| 821 | else if (Family == 184) | |
| 822 | {
| |
| 823 | Str_Family = "Intel Itanium 2"; | |
| 824 | } | |
| 825 | else if (Family == 185) | |
| 826 | {
| |
| 827 | Str_Family = "Intel Pentium M Processor"; | |
| 828 | } | |
| 829 | else if (Family == 190) | |
| 830 | {
| |
| 831 | Str_Family = "K7"; | |
| 832 | } | |
| 833 | else if (Family == 200) | |
| 834 | {
| |
| 835 | Str_Family = "IBM390 Family"; | |
| 836 | } | |
| 837 | else if (Family == 201) | |
| 838 | {
| |
| 839 | Str_Family = "G4"; | |
| 840 | } | |
| 841 | else if (Family == 202) | |
| 842 | {
| |
| 843 | Str_Family = "G5"; | |
| 844 | } | |
| 845 | else if (Family == 203) | |
| 846 | {
| |
| 847 | Str_Family = "G6"; | |
| 848 | } | |
| 849 | else if (Family == 204) | |
| 850 | {
| |
| 851 | Str_Family = "z/Architecture Base"; | |
| 852 | } | |
| 853 | else if (Family == 250) | |
| 854 | {
| |
| 855 | Str_Family = "i860"; | |
| 856 | } | |
| 857 | else if (Family == 251) | |
| 858 | {
| |
| 859 | Str_Family = "i960"; | |
| 860 | } | |
| 861 | else if (Family == 260) | |
| 862 | {
| |
| 863 | Str_Family = "SH-3"; | |
| 864 | } | |
| 865 | else if (Family == 261) | |
| 866 | {
| |
| 867 | Str_Family = "SH-4"; | |
| 868 | } | |
| 869 | else if (Family == 280) | |
| 870 | {
| |
| 871 | Str_Family = "ARM"; | |
| 872 | } | |
| 873 | else if (Family == 281) | |
| 874 | {
| |
| 875 | Str_Family = "StrongARM"; | |
| 876 | } | |
| 877 | else if (Family == 300) | |
| 878 | {
| |
| 879 | Str_Family = "6x86"; | |
| 880 | } | |
| 881 | else if (Family == 301) | |
| 882 | {
| |
| 883 | Str_Family = "MediaGX"; | |
| 884 | } | |
| 885 | else if (Family == 302) | |
| 886 | {
| |
| 887 | Str_Family = "MII"; | |
| 888 | } | |
| 889 | else if (Family == 320) | |
| 890 | {
| |
| 891 | Str_Family = "WinChip"; | |
| 892 | } | |
| 893 | else if (Family == 350) | |
| 894 | {
| |
| 895 | Str_Family = "DSP"; | |
| 896 | } | |
| 897 | else if (Family == 500) | |
| 898 | {
| |
| 899 | Str_Family = "Video Processor"; | |
| 900 | } | |
| 901 | ||
| 902 | #endregion | |
| 903 | ||
| 904 | #region ProcessorType String | |
| 905 | ||
| 906 | if (ProcessorType == 1) | |
| 907 | {
| |
| 908 | Str_ProcessorType = "Other"; | |
| 909 | } | |
| 910 | else if (ProcessorType == 2) | |
| 911 | {
| |
| 912 | Str_ProcessorType = "Unknown"; | |
| 913 | } | |
| 914 | else if (ProcessorType == 3) | |
| 915 | {
| |
| 916 | Str_ProcessorType = "Central Processor"; | |
| 917 | } | |
| 918 | else if (ProcessorType == 4) | |
| 919 | {
| |
| 920 | Str_ProcessorType = "Math Processor"; | |
| 921 | } | |
| 922 | else if (ProcessorType == 5) | |
| 923 | {
| |
| 924 | Str_ProcessorType = "DSP Processor"; | |
| 925 | } | |
| 926 | else if (ProcessorType == 6) | |
| 927 | {
| |
| 928 | Str_ProcessorType = "Video Processor"; | |
| 929 | } | |
| 930 | ||
| 931 | #endregion | |
| 932 | ||
| 933 | #region StatusInfo String | |
| 934 | ||
| 935 | if (StatusInfo == 1) | |
| 936 | {
| |
| 937 | Str_StatusInfo = "Other"; | |
| 938 | } | |
| 939 | else if (StatusInfo == 2) | |
| 940 | {
| |
| 941 | Str_StatusInfo = "Unknown"; | |
| 942 | } | |
| 943 | else if (StatusInfo == 3) | |
| 944 | {
| |
| 945 | Str_StatusInfo = "Enabled"; | |
| 946 | } | |
| 947 | else if (StatusInfo == 4) | |
| 948 | {
| |
| 949 | Str_StatusInfo = "Disabled"; | |
| 950 | } | |
| 951 | else if (StatusInfo == 5) | |
| 952 | {
| |
| 953 | Str_StatusInfo = "Not Applicable"; | |
| 954 | } | |
| 955 | ||
| 956 | #endregion | |
| 957 | ||
| 958 | #region UpgradeMethod String | |
| 959 | ||
| 960 | if (UpgradeMethod == 1) | |
| 961 | {
| |
| 962 | Str_UpgradeMethod = "Other"; | |
| 963 | } | |
| 964 | else if (UpgradeMethod == 2) | |
| 965 | {
| |
| 966 | Str_UpgradeMethod = "Unknown"; | |
| 967 | } | |
| 968 | else if (UpgradeMethod == 3) | |
| 969 | {
| |
| 970 | Str_UpgradeMethod = "Daughter Board"; | |
| 971 | } | |
| 972 | else if (UpgradeMethod == 4) | |
| 973 | {
| |
| 974 | Str_UpgradeMethod = "ZIF Socket"; | |
| 975 | } | |
| 976 | else if (UpgradeMethod == 5) | |
| 977 | {
| |
| 978 | Str_UpgradeMethod = "Replacement or Piggy Back"; | |
| 979 | } | |
| 980 | else if (UpgradeMethod == 6) | |
| 981 | {
| |
| 982 | Str_UpgradeMethod = "None"; | |
| 983 | } | |
| 984 | else if (UpgradeMethod == 7) | |
| 985 | {
| |
| 986 | Str_UpgradeMethod = "LIF Socket"; | |
| 987 | } | |
| 988 | else if (UpgradeMethod == 8) | |
| 989 | {
| |
| 990 | Str_UpgradeMethod = "Slot 1"; | |
| 991 | } | |
| 992 | else if (UpgradeMethod == 9) | |
| 993 | {
| |
| 994 | Str_UpgradeMethod = "Slot 2"; | |
| 995 | } | |
| 996 | else if (UpgradeMethod == 10) | |
| 997 | {
| |
| 998 | Str_UpgradeMethod = "370 Pin Socket"; | |
| 999 | } | |
| 1000 | else if (UpgradeMethod == 11) | |
| 1001 | {
| |
| 1002 | Str_UpgradeMethod = "Slot A"; | |
| 1003 | } | |
| 1004 | else if (UpgradeMethod == 12) | |
| 1005 | {
| |
| 1006 | Str_UpgradeMethod = "Slot M"; | |
| 1007 | } | |
| 1008 | else if (UpgradeMethod == 13) | |
| 1009 | {
| |
| 1010 | Str_UpgradeMethod = "Socket 423"; | |
| 1011 | } | |
| 1012 | else if (UpgradeMethod == 14) | |
| 1013 | {
| |
| 1014 | Str_UpgradeMethod = "Socket A (Socket 462)"; | |
| 1015 | } | |
| 1016 | else if (UpgradeMethod == 15) | |
| 1017 | {
| |
| 1018 | Str_UpgradeMethod = "Socket 478"; | |
| 1019 | } | |
| 1020 | else if (UpgradeMethod == 16) | |
| 1021 | {
| |
| 1022 | Str_UpgradeMethod = "Socket 754"; | |
| 1023 | } | |
| 1024 | else if (UpgradeMethod == 17) | |
| 1025 | {
| |
| 1026 | Str_UpgradeMethod = "Socket 940"; | |
| 1027 | } | |
| 1028 | else if (UpgradeMethod == 18) | |
| 1029 | {
| |
| 1030 | Str_UpgradeMethod = "Socket 939"; | |
| 1031 | } | |
| 1032 | ||
| 1033 | #endregion | |
| 1034 | ||
| 1035 | #region VoltageCaps String | |
| 1036 | ||
| 1037 | if (VoltageCaps == 1) | |
| 1038 | {
| |
| 1039 | Str_VoltageCaps = "5 volts"; | |
| 1040 | } | |
| 1041 | else if (VoltageCaps == 2) | |
| 1042 | {
| |
| 1043 | Str_VoltageCaps = "3.3 volts"; | |
| 1044 | } | |
| 1045 | else if (VoltageCaps == 4) | |
| 1046 | {
| |
| 1047 | Str_VoltageCaps = "2.9 volts"; | |
| 1048 | } | |
| 1049 | ||
| 1050 | #endregion | |
| 1051 | } | |
| 1052 | } | |
| 1053 | } |