次の方法で共有


2.2.4.1 Prototype Result Object

The prototype result object is an IWbemClassObject (section 2.2.4) that is returned when the lFlags parameter of the IWbemServices::ExecQuery (section 3.1.4.3.18) or IWbemServices::ExecQueryAsync (section 3.1.4.3.19) method includes the WBEM_FLAG_PROTOTYPE flag.

The query returns the CIM class object that is specified in the CLASS-NAME of the query that is modified to match the query.

If the query specifies PROPERTY-LIST, as specified in section 2.2.1.1, the class object is modified to represent the results of the query by removing all the properties that are not specified in the PROPERTY-LIST of the query and by adding selected properties with the Order qualifier (see the 2nd paragraph following concerning the Order qualifier). In this case, the CIM class is encoded as an IWbemClassObject object, with an ObjectFlags block that contains a 0x10 value that is set as specified in [MS-WMIO] section 2.2.6. If any key property is removed because it is not specified in PROPERTY-LIST, the 0x40 flag is set on ObjectFlags.

If the query specifies ASTERISK, as specified in section 2.2.1.1, the class object is returned with all the properties added to the Order qualifier. In this case, the CIM class is encoded as an IWbemClassObject object and the 0x10 flag is not set in ObjectFlags.

The Order qualifier (QUALIFIER-NAME attribute set to Order, see section 2.2.1.1) is an array of 32-bit signed integers. Each value in the array represents the position of the property in PROPERTY-LIST (if PROPERTY-LIST is specified) or represents the order in which the property appears in the class (if the query specifies ASTERISK). The position is encoded starting from 0.

For example,

 select prop1,prop2,prop1 from class1

results in class1 containing only two properties, prop1 and prop2. The prop1 property is added to an Order qualifier that has a value of {0,2}, and the prop2 property is added to an Order qualifier that has a value of {1}.

Note The prop1 property occurs twice in the PROPERTY-LIST, at positions 1 and 3, and therefore, has two values {0,2}.

If the query specifies a PROPERTY-LIST that does not contain at least one of the following properties, the DerivationList in ClassPart of the CurrentClass, as specified in [MS-WMIO] section 2.2.17, is encoded as empty:

  • __DERIVATION

  • __SUPERCLASS

  • __DYNASTY

Otherwise, the DerivationList in ClassPart of the CurrentClass is encoded in the same way as the actual CIM class that represents the CLASS-NAME of the query.

The PropertyLookupTable, NdTable, ValueTable, and ClassHeap in ClassPart of the CurrentClass (as specified in [MS-WMIO] section 2.2.15) are encoded to contain only the selected properties in the query.

Remaining items are encoded in the same way as the CIM class that represents the CLASS-NAME that is specified in the query.