3.2.5.13 Processing RopWriteStream

When the server receives a RopWriteStream ROP request buffer ([MS-OXCROPS] section 2.2.9.3) from the client, the server parses the buffer. The server responds with a RopWriteStream ROP response buffer. For details about how the server parses buffers and processes ROPs, see [MS-OXCROPS] section 3.2.5.1. For details about how the server formats buffers for the response, see [MS-OXCROPS] section 3.2.5.2.

The server SHOULD<12> return the TooBig error code if it writes less than the amount requested. The server MUST store the data that is specified in the ROP request buffer into a stream buffer, writing forward starting at the current seek pointer. The seek pointer MUST be moved forward the same number of bytes as were written to the Stream object.

After a RopWriteStream ROP request buffer is processed, the new value of the property MUST be immediately available for retrieval by a ROP that uses the same object handle. However, the new value of the property is not persisted to the database. For a Message object, the new value is persisted to the database when a successful RopSaveChangesMessage ROP ([MS-OXCROPS] section 2.2.6.3) is issued. For an Attachment object, the new value is persisted to the database when a successful RopSaveChangesAttachment ROP ([MS-OXCROPS] section 2.2.6.15) followed by a successful RopSaveChangesMessage ROP is issued. For a Folder object, the value is persisted when the RopCommitStream ROP ([MS-OXCROPS] section 2.2.9.5) is issued on the Stream object or the Stream object is closed with a RopRelease ROP ([MS-OXCROPS] section 2.2.15.3).

The following error codes SHOULD be returned when the scenarios described in the corresponding Description column of the following table are met.

Error code name

Value

Description

TooBig

0x80040305

The write will exceed the maximum stream size.

StreamAccessDenied

0x80030005

Write access is denied.