Home > Articles > Operating Systems, Server > Microsoft Servers

  • Print
  • + Share This
This chapter is from the book

Intrinsic Data Types

In the example class, all of the properties are assigned one of the intrinsic data types. Table 4.4 shows the other property data types allowed in MOF format.

Table 4.4 Intrinsic Data Types

Intrinsic data type



Boolean value (i.e. TRUE or FALSE, 1 or 0)


Unicode Style 2-byte character


A string that contains the date and time


An instance of a class within CIM


4-byte floating point value


8-byte floating point value


A strongly typed reference


8-byte signed integer


4-byte signed integer


2-byte signed integer


1-byte signed integer


8-byte unsigned integer


4-byte unsigned integer


2-byte unsigned integer


1-byte unsigned integer

Array of...

An array of any of the above data types

Instance Creation

Instance creation can take place only after the corresponding class definition within a MOF file, which we declared in the previous section. The only case in which this rule does not apply is if the class definition already exists in the CIM repository within the target namespace. We create instances of classes using the MOF statement

instance of <classname>

Remember that MOF keywords are not case sensitive, so the case you use does not matter. To create an instance of the CD_ROM class, we could use the declaration in Figure 4.9.

Figure 4.9Figure 4.9 Creating an instance of MOF


When writing MOF files, it sometimes is expedient to create an alias that refers to a specific object instance. This alias can be used later in conjunction with a variable that is a pointer to an object (for example, the ref: keyword) to point to that specific object instance. If in the example in Figure 4.9 we declared an association class that referenced the CDROM class, we could use aliasing as in Figure 4.10.

Figure 4.10Figure 4.10 Using an alias in MOF

  • + Share This
  • 🔖 Save To Your Account