2.2.13.4 IWbemContextArray Marshaling Structure

The IWbemContextArray data structure defines the wire format for array data that is used by this protocol. IWbemContextArray has the following structure:

 IWbemContextArray = ElementCount ElementSize *Elements
  • ElementCount MUST be an integer that represents the number of elements in the array. ElementCount = UINT32.

  • ElementSize MUST represent the size of a single element in the array. The size MUST match the size of the elements. ElementSize = UINT32.

  • Elements is a variable stream of bytes that represent all element values in the array. (Array elements are marshaled in a different representation from nonarray elements.)

    Each element MUST be marshaled as an array of bytes that use the following representation.

    Type

    Marshaling

    VT_BSTR

    MUST be marshaled as an IWbemContextString. In this case, ElementSize SHOULD be set to 4 or 8.<4>

    VT_IUNKNOWN

    MUST be marshaled as an array of bytes that represent a marshaling buffer for the IWbemClassObject interface. In this case, ElementSize SHOULD be set to 4 or 8.<5>

    VT_NULL

    MUST be marshaled as 0 bytes.

    VT_I1, VT_UI1

    MUST be marshaled as 1 byte.

    VT_I4, VT_UI4

    MUST be marshaled in 4-byte little-endian format.

    VT_R4

     MUST be marshaled as an array of 8 bytes with the first 4 bytes containing the value of the property, as specified in [IEEE754], in a 4-byte floating-point format.

    VT_R8

    MUST be marshaled as an 8-byte floating-point format, as specified in [IEEE754].

    VT_I2, VT_BOOL, VT_UI2

    MUST be marshaled as a 2-byte little-endian format.