2.2.14 ObjectArray Structure

The ObjectArray structure MUST be used to encode multiple CIM objects that are returned in response to the IWbemWCOSmartEnum::Next (section 3.1.4.7.1) method. This structure is also used to encode parameters of the optimized IWbemObjectSink::Indicate (section 3.1.4.2.1) method.<6> To minimize network bandwidth, a server SHOULD support the ObjectArray structure when an array of CIM objects is sent.

The optimization MUST be achieved by sending the CIM class information just once at the beginning of the communication for the same class type. Instances of different classes are allowed, in which case only the first instance of every unique class MUST contain the CIM class information for optimization. This CIM class MUST be identified by a randomly generated GUID, generated by the server, that that is maintained by both the server and the client for the duration of the method call. The remaining CIM instances MUST be sent without the CIM class information. The CIM class definition that is identified by the GUID is used to reconstruct the full CIM instances on the client side.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

dwByteOrdering

abSignature

...

dwSizeOfHeader1

dwDataSize1

dwFlags

bVersion

bPacketType

dwSizeOfHeader2

...

dwDataSize2

...

dwSizeOfHeader3

...

dwDataSize3

...

dwNumObjects

...

wbemObjects (variable)

...

dwByteOrdering (4 bytes): The byte ordering. It MUST be value 0.

Value

Meaning

0x00000000

The value when byte ordering is little-endian.

abSignature (8 bytes): MUST be set to {0x57, 0x42, 0x45, 0x4D, 0x44, 0x41, 0x54, 0x41} (a byte array containing the unquoted, unterminated ASCII string "WBEMDATA").

dwSizeOfHeader1 (4 bytes): This stores the total size of these fields: dwByteOrdering, abSignature, dwSizeofHeader1, dwDataSize1, dwFlags, bVersion, and bPacketType.

The size of the header MUST be 0x0000001A. Data immediately follows the header.

dwDataSize1 (4 bytes): MUST indicate the length, in bytes, of the data that follows this header, starting at the dwSizeOfHeader2 field.

dwFlags (4 bytes): The flag value MUST be 0x00000000.

bVersion (1 byte): The version number of the header. The version MUST be 1.

bPacketType (1 byte): The value of this field is dependent on the call context.

Value

Meaning

0x00000000

The value in the context of an optimized IWbemObjectSink::Indicate call.

0x00000001

The value in the context of an optimized IWbemWCOSmartEnum::Next call.

dwSizeOfHeader2 (4 bytes): This stores the size of these fields: dwSizeofHeader2 and dwDataSize2.

This value MUST be 8. Data immediately follows after the field dwDataSize2.

dwDataSize2 (4 bytes): MUST be the size, in bytes, of the data that follows this field.

dwSizeOfHeader3 (4 bytes):  This stores the size of these fields: dwSizeofHeader3, dwDataSize3, and dwNumObjects. This value MUST be 12. Data immediately follows after the field dwNumObjects.

dwDataSize3 (4 bytes): MUST indicate the length of the remaining data, starting at the wbemObjects field.

dwNumObjects (4 bytes): MUST be the number of CIM objects in the ObjectArray.

wbemObjects (variable): The objects array that contains the CIM class definition and CIM instances. These CIM objects MUST be encoded in the WBEM_DATAPACKET_OBJECT structure.