3.1.4.2 Writing Configuration Data

To write settings in a configuration data settings group, as specified in section 2.2.2, the client MUST first look for a preexisting configuration data message with preexisting settings, as specified in section 3.1.4.1.

If the client found a matching message or created a new one, it MUST retrieve the serialized settings stream from the property specified by the configuration data message by using steps equivalent to the following, as specified in [MS-OXCPRPT] section 2.2.15:

  1. Open a Stream object handle on the stream property specified by the configuration data message by sending the RopOpenStream ROP ([MS-OXCROPS] section 2.2.9.1).

  2. Read the serialized settings by using the RopReadStream ROP ([MS-OXCROPS] section 2.2.9.2).

If the message does not exist, the client MUST create the message, as specified in [MS-OXCMSG] section 2.2.3.2, by sending the RopCreateMessage ROP ([MS-OXCROPS] section 2.2.6.2) on the folder and passing the Associated flag.

If the client found a matching message or created a new one, it MUST save the serialized settings stream into the property specified by the configuration data message by using steps equivalent to the following, as specified in [MS-OXCPRPT] section 2.2.16:

  1. Open a Stream object handle on the stream property specified by the configuration data message by sending the RopOpenStream ROP.

  2. Write the serialized settings by using the RopWriteStream ROP ([MS-OXCROPS] section 2.2.9.3).

  3. Persist the stream back to the property by sending the RopRelease ROP ([MS-OXCROPS] section 2.2.15.3).

  4. Persist changes to the message by sending the RopSaveChangesMessage ROP ([MS-OXCROPS] section 2.2.6.3).