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