forked from apache/cloudstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathROOT.CIMV2.Win32_OperatingSystem.cs
More file actions
2452 lines (2129 loc) · 97.6 KB
/
Copy pathROOT.CIMV2.Win32_OperatingSystem.cs
File metadata and controls
2452 lines (2129 loc) · 97.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
namespace CloudStack.Plugin.WmiWrappers.ROOT.CIMV2 {
using System;
using System.ComponentModel;
using System.Management;
using System.Collections;
using System.Globalization;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
// Functions ShouldSerialize<PropertyName> are functions used by VS property browser to check if a particular property has to be serialized. These functions are added for all ValueType properties ( properties of type Int32, BOOL etc.. which cannot be set to null). These functions use Is<PropertyName>Null function. These functions are also used in the TypeConverter implementation for the properties to check for NULL value of property so that an empty value can be shown in Property browser in case of Drag and Drop in Visual studio.
// Functions Is<PropertyName>Null() are used to check if a property is NULL.
// Functions Reset<PropertyName> are added for Nullable Read/Write properties. These functions are used by VS designer in property browser to set a property to NULL.
// Every property added to the class for WMI property has attributes set to define its behavior in Visual Studio designer and also to define a TypeConverter to be used.
// Datetime conversion functions ToDateTime and ToDmtfDateTime are added to the class to convert DMTF datetime to System.DateTime and vice-versa.
// An Early Bound class generated for the WMI class.Win32_OperatingSystem
public class OperatingSystem0 : System.ComponentModel.Component {
// Private property to hold the WMI namespace in which the class resides.
private static string CreatedWmiNamespace = "ROOT\\CIMV2";
// Private property to hold the name of WMI class which created this class.
private static string CreatedClassName = "Win32_OperatingSystem";
// Private member variable to hold the ManagementScope which is used by the various methods.
private static System.Management.ManagementScope statMgmtScope = null;
private ManagementSystemProperties PrivateSystemProperties;
// Underlying lateBound WMI object.
private System.Management.ManagementObject PrivateLateBoundObject;
// Member variable to store the 'automatic commit' behavior for the class.
private bool AutoCommitProp;
// Private variable to hold the embedded property representing the instance.
private System.Management.ManagementBaseObject embeddedObj;
// The current WMI object used
private System.Management.ManagementBaseObject curObj;
// Flag to indicate if the instance is an embedded object.
private bool isEmbedded;
// Below are different overloads of constructors to initialize an instance of the class with a WMI object.
public OperatingSystem0() {
this.InitializeObject(null, new System.Management.ManagementPath(OperatingSystem0.ConstructPath()), null);
}
public OperatingSystem0(System.Management.ManagementScope mgmtScope) {
this.InitializeObject(mgmtScope, new System.Management.ManagementPath(OperatingSystem0.ConstructPath()), null);
}
public OperatingSystem0(System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(null, new System.Management.ManagementPath(OperatingSystem0.ConstructPath()), getOptions);
}
public OperatingSystem0(System.Management.ManagementScope mgmtScope, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, new System.Management.ManagementPath(OperatingSystem0.ConstructPath()), getOptions);
}
public OperatingSystem0(System.Management.ManagementPath path) {
this.InitializeObject(null, path, null);
}
public OperatingSystem0(System.Management.ManagementScope mgmtScope, System.Management.ManagementPath path, System.Management.ObjectGetOptions getOptions) {
this.InitializeObject(mgmtScope, path, getOptions);
}
public OperatingSystem0(System.Management.ManagementObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
PrivateLateBoundObject = theObject;
PrivateSystemProperties = new ManagementSystemProperties(PrivateLateBoundObject);
curObj = PrivateLateBoundObject;
}
else {
throw new System.ArgumentException("Class name does not match.");
}
}
public OperatingSystem0(System.Management.ManagementBaseObject theObject) {
Initialize();
if ((CheckIfProperClass(theObject) == true)) {
embeddedObj = theObject;
PrivateSystemProperties = new ManagementSystemProperties(theObject);
curObj = embeddedObj;
isEmbedded = true;
}
else {
throw new System.ArgumentException("Class name does not match.");
}
}
// Property returns the namespace of the WMI class.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string OriginatingNamespace {
get {
return "ROOT\\CIMV2";
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ManagementClassName {
get {
string strRet = CreatedClassName;
if ((curObj != null)) {
if ((curObj.ClassPath != null)) {
strRet = ((string)(curObj["__CLASS"]));
if (((strRet == null)
|| (strRet == string.Empty))) {
strRet = CreatedClassName;
}
}
}
return strRet;
}
}
// Property pointing to an embedded object to get System properties of the WMI object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ManagementSystemProperties SystemProperties {
get {
return PrivateSystemProperties;
}
}
// Property returning the underlying lateBound object.
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public System.Management.ManagementBaseObject LateBoundObject {
get {
return curObj;
}
}
// ManagementScope of the object.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public System.Management.ManagementScope Scope {
get {
if ((isEmbedded == false)) {
return PrivateLateBoundObject.Scope;
}
else {
return null;
}
}
set {
if ((isEmbedded == false)) {
PrivateLateBoundObject.Scope = value;
}
}
}
// Property to show the commit behavior for the WMI object. If true, WMI object will be automatically saved after each property modification.(ie. Put() is called after modification of a property).
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool AutoCommit {
get {
return AutoCommitProp;
}
set {
AutoCommitProp = value;
}
}
// The ManagementPath of the underlying WMI object.
[Browsable(true)]
public System.Management.ManagementPath Path {
get {
if ((isEmbedded == false)) {
return PrivateLateBoundObject.Path;
}
else {
return null;
}
}
set {
if ((isEmbedded == false)) {
if ((CheckIfProperClass(null, value, null) != true)) {
throw new System.ArgumentException("Class name does not match.");
}
PrivateLateBoundObject.Path = value;
}
}
}
// Public static scope property which is used by the various methods.
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public static System.Management.ManagementScope StaticScope {
get {
return statMgmtScope;
}
set {
statMgmtScope = value;
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The BootDevice property indicates the name of the disk drive from which the Win32" +
" operating system boots. \nExample: \\\\Device\\Harddisk0.")]
public string BootDevice {
get {
return ((string)(curObj["BootDevice"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The BuildNumber property indicates the build number of the operating system. It " +
"can be used for more precise versioning information than product release version" +
" numbers\nExample: 1381")]
public string BuildNumber {
get {
return ((string)(curObj["BuildNumber"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The BuildType property indicates the type of build used for the operating system." +
" Examples are retail build and checked build.")]
public string BuildType {
get {
return ((string)(curObj["BuildType"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Caption property is a short textual description (one-line string) of the obje" +
"ct.")]
public string Caption {
get {
return ((string)(curObj["Caption"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The CodeSet property indicates the code page value used by the operating system. A code page contains a character table used by the operating system to translate strings for different languages. The American National Standards Institute (ANSI) lists values that represent defined code pages. If the operating system does not use an ANSI code page, this member will be set to 0. The CodeSet string can use up to six characters to define the code page value.
Example: 1255.")]
public string CodeSet {
get {
return ((string)(curObj["CodeSet"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The CountryCode property indicates the code for the country/regionused by the operating system. Values are based on international phone dialing prefixes (also referred to as IBM country/region codes). The CountryCode string can use up to six characters to define the country/region code value.
Example: 1 for the United States)")]
public string CountryCode {
get {
return ((string)(curObj["CountryCode"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("CreationClassName indicates the name of the class or the subclass used in the cre" +
"ation of an instance. When used with the other key properties of this class, thi" +
"s property allows all instances of this class and its subclasses to be uniquely " +
"identified.")]
public string CreationClassName {
get {
return ((string)(curObj["CreationClassName"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("CSCreationClassName contains the scoping computer system\'s creation class name.")]
public string CSCreationClassName {
get {
return ((string)(curObj["CSCreationClassName"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The CSDVersion property contains a null-terminated string, that indicates the latest Service Pack installed on the computer system. If no Service Pack is installed, the string is NULL. For computer systems running Windows 95, this property contains a null-terminated string that provides arbitrary additional information about the operating system.
Example: Service Pack 3.")]
public string CSDVersion {
get {
return ((string)(curObj["CSDVersion"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("CSName contains the scoping computer system\'s name.")]
public string CSName {
get {
return ((string)(curObj["CSName"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsCurrentTimeZoneNull {
get {
if ((curObj["CurrentTimeZone"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("CurrentTimeZone indicates the number of minutes the operating system is offset fr" +
"om Greenwich Mean Time. Either the number is positive, negative or zero.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public short CurrentTimeZone {
get {
if ((curObj["CurrentTimeZone"] == null)) {
return System.Convert.ToInt16(0);
}
return ((short)(curObj["CurrentTimeZone"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDataExecutionPrevention_32BitApplicationsNull {
get {
if ((curObj["DataExecutionPrevention_32BitApplications"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("If true, indicates that 32-bit applications are running with Data Execution Preve" +
"ntion (DEP) applied. (false if DataExecutionPrevention_Available = false)")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public bool DataExecutionPrevention_32BitApplications {
get {
if ((curObj["DataExecutionPrevention_32BitApplications"] == null)) {
return System.Convert.ToBoolean(0);
}
return ((bool)(curObj["DataExecutionPrevention_32BitApplications"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDataExecutionPrevention_AvailableNull {
get {
if ((curObj["DataExecutionPrevention_Available"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"If true, indicates that the hardware supports Windows Data Execution Prevention (DEP) technology. DEP ensures that all memory locations are marked with a non-executable attribute unless the memory location explicitly contains executable code. This can help mitigate certain types of buffer overrun security exploits. If DEP is available, 64-bit applications are automatically protected. To determine if DEP has been enabled for 32-bit applications and drivers, use the DataExecutionPrevention_ properties ")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public bool DataExecutionPrevention_Available {
get {
if ((curObj["DataExecutionPrevention_Available"] == null)) {
return System.Convert.ToBoolean(0);
}
return ((bool)(curObj["DataExecutionPrevention_Available"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDataExecutionPrevention_DriversNull {
get {
if ((curObj["DataExecutionPrevention_Drivers"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("If true, indicates that drivers are running with Data Execution Prevention (DEP) " +
"applied. (false if DataExecutionPrevention_Available = false)")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public bool DataExecutionPrevention_Drivers {
get {
if ((curObj["DataExecutionPrevention_Drivers"] == null)) {
return System.Convert.ToBoolean(0);
}
return ((bool)(curObj["DataExecutionPrevention_Drivers"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDataExecutionPrevention_SupportPolicyNull {
get {
if ((curObj["DataExecutionPrevention_SupportPolicy"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The DataExecutionPrevention_SupportPolicy indicates which one of four Data Execution Prevention (DEP) settings is applied. Each setting varies by the extent to which DEP is applied to 32-bit applications. Note that DEP is always applied to the Windows kernel. Always On (not available in the user interface) indicates that DEP is enabled for all 32-bit applications on the machine with no exceptions. OptOut indicates DEP is on by default for all 32-bit applications and that a user or administrator must explicitly remove support for a 32-bit application by adding to an exceptions list. OptIn indicates DEP is on for a limited number of binaries, the kernel, and all Windows services but it is off by default for all 32-bit applications; a user or administrator must explicitly choose the AlwaysOn (not available in the user interface) or OptOut setting before DEP can be applied to 32-bit applications. AlwaysOff (not available in the user interface) indicates DEP is turned off for all 32-bit applications on the machine. ")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public DataExecutionPrevention_SupportPolicyValues DataExecutionPrevention_SupportPolicy {
get {
if ((curObj["DataExecutionPrevention_SupportPolicy"] == null)) {
return ((DataExecutionPrevention_SupportPolicyValues)(System.Convert.ToInt32(4)));
}
return ((DataExecutionPrevention_SupportPolicyValues)(System.Convert.ToInt32(curObj["DataExecutionPrevention_SupportPolicy"])));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDebugNull {
get {
if ((curObj["Debug"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The Debug property indicates whether the operating system is a checked (debug) build. Checked builds provide error checking, argument verification, and system debugging code. Additional code in a checked binary generates a kernel debugger error message and breaks into the debugger. This helps immediately determine the cause and location of the error. Performance suffers in the checked build due to the additional code that is executed.
Values: TRUE or FALSE, A value of TRUE indicates the debugging version of User.exe is installed.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public bool Debug {
get {
if ((curObj["Debug"] == null)) {
return System.Convert.ToBoolean(0);
}
return ((bool)(curObj["Debug"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Description property provides a description of the Windows operating system. " +
"Some user interfaces (those that allow editing of this description) limit its le" +
"ngth to 48 characters.")]
public string Description {
get {
return ((string)(curObj["Description"]));
}
set {
curObj["Description"] = value;
if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsDistributedNull {
get {
if ((curObj["Distributed"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Boolean indicating whether the operating system is distributed across several com" +
"puter system nodes. If so, these nodes should be grouped as a cluster.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public bool Distributed {
get {
if ((curObj["Distributed"] == null)) {
return System.Convert.ToBoolean(0);
}
return ((bool)(curObj["Distributed"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsEncryptionLevelNull {
get {
if ((curObj["EncryptionLevel"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The EncryptionLevel property specifies if the encryption level for secure transac" +
"tions is 40-bit, 128-bit, or n-bit encryption.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public EncryptionLevelValues EncryptionLevel {
get {
if ((curObj["EncryptionLevel"] == null)) {
return ((EncryptionLevelValues)(System.Convert.ToInt32(3)));
}
return ((EncryptionLevelValues)(System.Convert.ToInt32(curObj["EncryptionLevel"])));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsForegroundApplicationBoostNull {
get {
if ((curObj["ForegroundApplicationBoost"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The ForegroundApplicationBoost property indicates the increase in priority given to the foreground application. On computer systems running Windows NT 4.0 and Windows 2000, application boost is implemented by giving an application more execution time slices (quantum lengths). A ForegroundApplicationBoost value of 0 indicates the system boosts the quantum length by 6; if 1, then 12; and if 2 then 18. On Windows NT 3.51 and earlier, application boost is implemented by increasing the scheduling priority. For these systems, the scheduling priority is increased by the value of this property. The default value is 2.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public ForegroundApplicationBoostValues ForegroundApplicationBoost {
get {
if ((curObj["ForegroundApplicationBoost"] == null)) {
return ((ForegroundApplicationBoostValues)(System.Convert.ToInt32(3)));
}
return ((ForegroundApplicationBoostValues)(System.Convert.ToInt32(curObj["ForegroundApplicationBoost"])));
}
set {
if ((ForegroundApplicationBoostValues.NULL_ENUM_VALUE == value)) {
curObj["ForegroundApplicationBoost"] = null;
}
else {
curObj["ForegroundApplicationBoost"] = value;
}
if (((isEmbedded == false)
&& (AutoCommitProp == true))) {
PrivateLateBoundObject.Put();
}
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFreePhysicalMemoryNull {
get {
if ((curObj["FreePhysicalMemory"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Number of kilobytes of physical memory currently unused and available")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public ulong FreePhysicalMemory {
get {
if ((curObj["FreePhysicalMemory"] == null)) {
return System.Convert.ToUInt64(0);
}
return ((ulong)(curObj["FreePhysicalMemory"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFreeSpaceInPagingFilesNull {
get {
if ((curObj["FreeSpaceInPagingFiles"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The total number of KBytes that can be mapped into the OperatingSystem\'s paging f" +
"iles without causing any other pages to be swapped out. 0 indicates that there a" +
"re no paging files.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public ulong FreeSpaceInPagingFiles {
get {
if ((curObj["FreeSpaceInPagingFiles"] == null)) {
return System.Convert.ToUInt64(0);
}
return ((ulong)(curObj["FreeSpaceInPagingFiles"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsFreeVirtualMemoryNull {
get {
if ((curObj["FreeVirtualMemory"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Number of kilobytes of virtual memory currently unused and available. For example" +
", this may be calculated by adding the amount of free RAM to the amount of free " +
"paging space (i.e., adding the properties, FreePhysicalMemory and FreeSpaceInPag" +
"ingFiles).")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public ulong FreeVirtualMemory {
get {
if ((curObj["FreeVirtualMemory"] == null)) {
return System.Convert.ToUInt64(0);
}
return ((ulong)(curObj["FreeVirtualMemory"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsInstallDateNull {
get {
if ((curObj["InstallDate"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The InstallDate property is datetime value indicating when the object was install" +
"ed. A lack of a value does not indicate that the object is not installed.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public System.DateTime InstallDate {
get {
if ((curObj["InstallDate"] != null)) {
return ToDateTime(((string)(curObj["InstallDate"])));
}
else {
return System.DateTime.MinValue;
}
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLargeSystemCacheNull {
get {
if ((curObj["LargeSystemCache"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The LargeSystemCache property indicates whether to optimize memory for applicatio" +
"ns (value=0) or for system performance (value=1).")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public LargeSystemCacheValues LargeSystemCache {
get {
if ((curObj["LargeSystemCache"] == null)) {
return ((LargeSystemCacheValues)(System.Convert.ToInt32(2)));
}
return ((LargeSystemCacheValues)(System.Convert.ToInt32(curObj["LargeSystemCache"])));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLastBootUpTimeNull {
get {
if ((curObj["LastBootUpTime"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Time when the operating system was last booted")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public System.DateTime LastBootUpTime {
get {
if ((curObj["LastBootUpTime"] != null)) {
return ToDateTime(((string)(curObj["LastBootUpTime"])));
}
else {
return System.DateTime.MinValue;
}
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsLocalDateTimeNull {
get {
if ((curObj["LocalDateTime"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Operating system\'s notion of the local date and time of day.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public System.DateTime LocalDateTime {
get {
if ((curObj["LocalDateTime"] != null)) {
return ToDateTime(((string)(curObj["LocalDateTime"])));
}
else {
return System.DateTime.MinValue;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"The Locale property indicates the language identifier used by the operating system. A language identifier is a standard international numeric abbreviation for a country or region. Each language has a unique language identifier (LANGID), a 16-bit value that consists of a primary language identifier and a secondary language identifier.")]
public string Locale {
get {
return ((string)(curObj["Locale"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Manufacturer property indicates the name of the operating system manufacturer" +
". For Win32 systems this value will be Microsoft Corporation.")]
public string Manufacturer {
get {
return ((string)(curObj["Manufacturer"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxNumberOfProcessesNull {
get {
if ((curObj["MaxNumberOfProcesses"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Maximum number of process contexts the operating system can support. If there is no fixed maximum, the value should be 0. On systems that have a fixed maximum, this object can help diagnose failures that occur when the maximum is reached. If unknown, enter -1.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public uint MaxNumberOfProcesses {
get {
if ((curObj["MaxNumberOfProcesses"] == null)) {
return System.Convert.ToUInt32(0);
}
return ((uint)(curObj["MaxNumberOfProcesses"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMaxProcessMemorySizeNull {
get {
if ((curObj["MaxProcessMemorySize"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description(@"Maximum number of kilobytes of memory that can be allocated to a process. For operating systems with no virtual memory, this value is typically equal to the total amount of physical memory minus memory used by the BIOS and OS. For some operating systems, this value may be infinity - in which case, 0 should be entered. In other cases, this value could be a constant - for example, 2G or 4G.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public ulong MaxProcessMemorySize {
get {
if ((curObj["MaxProcessMemorySize"] == null)) {
return System.Convert.ToUInt64(0);
}
return ((ulong)(curObj["MaxProcessMemorySize"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The MUILanguages property indicates the MUI Languages installed in the system. \n " +
"Example: en-us.")]
public string[] MUILanguages {
get {
return ((string[])(curObj["MUILanguages"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Name of the operating system instance within a computer system.")]
public string Name {
get {
return ((string)(curObj["Name"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsNumberOfLicensedUsersNull {
get {
if ((curObj["NumberOfLicensedUsers"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Number of user licenses for the operating system. If unlimited, enter 0. If unkno" +
"wn, enter -1.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public uint NumberOfLicensedUsers {
get {
if ((curObj["NumberOfLicensedUsers"] == null)) {
return System.Convert.ToUInt32(0);
}
return ((uint)(curObj["NumberOfLicensedUsers"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsNumberOfProcessesNull {
get {
if ((curObj["NumberOfProcesses"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Number of process contexts currently loaded or running on the operating system.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public uint NumberOfProcesses {
get {
if ((curObj["NumberOfProcesses"] == null)) {
return System.Convert.ToUInt32(0);
}
return ((uint)(curObj["NumberOfProcesses"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsNumberOfUsersNull {
get {
if ((curObj["NumberOfUsers"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("Number of user sessions for which the operating system is currently storing state" +
" information")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public uint NumberOfUsers {
get {
if ((curObj["NumberOfUsers"] == null)) {
return System.Convert.ToUInt32(0);
}
return ((uint)(curObj["NumberOfUsers"]));
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsOperatingSystemSKUNull {
get {
if ((curObj["OperatingSystemSKU"] == null)) {
return true;
}
else {
return false;
}
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The OperatingSystemSKU property identifies the SKU of the operating system.")]
[TypeConverter(typeof(WMIValueTypeConverter))]
public uint OperatingSystemSKU {
get {
if ((curObj["OperatingSystemSKU"] == null)) {
return System.Convert.ToUInt32(0);
}
return ((uint)(curObj["OperatingSystemSKU"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The Organization property indicates the registered user\'s (of the operating syste" +
"m) company name.\nExample: Microsoft Corporation.")]
public string Organization {
get {
return ((string)(curObj["Organization"]));
}
}
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("The OSArchitecture property indicates the Architecture of the operating system.Ex" +
"ample: 32-bit, 64-bit Intel, 64-bit AMD ")]
public string OSArchitecture {
get {
return ((string)(curObj["OSArchitecture"]));
}