The pragma classflags preprocessor command controls the way WMI creates or updates classes depending on the flags specified.
The following describes the syntax for this command:
[Flag] must be one or more of the following arguments. You can combine any flags that do not contradict each other.
|createonly||Instructs the compiler not make any changes to existing classes and terminates a compilation if a class specified in the MOF file already exists in WMI.|
|forceupdate||Forces updates of classes when conflicting child classes exist. For example, if you define a class qualifier in a child class and the base class attempts to add the same qualifier, using this flag causes the compiler to resolve this conflict by deleting the conflicting qualifier in the child class. If the child class has instances, the update fails.|
|safeupdate||Allows the compiler to update classes even if child classes exist, if the change does not cause conflicts with child classes. For example, this flag allows you to add a new property to a base class without also having to add the property to any pre-existing child class. If the child classes have instances, the update fails.|
|updateonly||Instructs the compiler to not create any new classes and causes the compiler to terminate the compilation if a class specified in the MOF file does not exist.|
The following example shows how to use this command with the updateonly and forceupdate flags.
Minimum supported client
Minimum supported server
|Windows Server 2003|