2.2.13.3 IWbemContextString Marshaling Structure

The IWbemContextString data structure defines the wire format for the string data that is used by this protocol. Strings (property names and VT_BSTR properties values) MUST be represented as a 32-bit character count and followed by a sequence of characters that are encoded in UTF-16, as specified in [UNICODE].

IWbemContextString has the following structure.

 IWbemContextString = StringLength *UnicodeCharacter
  • StringLength MUST represent the length of the string as a character count.

     StringLength = UINT32
     UnicodeCharacter = 2OCTET
    
  • StringLength MUST be followed by a sequence of characters encoded with UTF-16, as specified in [UNICODE]. The length of the sequence MUST be equal to StringLength. The string MUST NOT have a terminating NIL (0x0000) character.