Reading a Property as a Stream

If the server returned NotEnoughMemory (0x8007000E) in place of the property value in the ROP response buffer of the RopGetPropertiesSpecific ROP ([MS-OXCROPS] section or RopGetPropertiesAll ROP ([MS-OXCROPS] section, the property is too big to fit in a single ROP. In this case, the client can read the property as a stream.

If the property to be read is a named property, the client obtains the property ID for that property, as specified in section

The client then obtains a handle to a Stream object for the property by using the RopOpenStream ROP ([MS-OXCROPS] section The client sets the OpenModeFlags field of the ROP request buffer to ReadOnly. To verify that the handle was retrieved, the client checks the ReturnValue field of the ROP response buffer.

If it is not necessary for the client to read from the start of the stream, the client uses the RopSeekStream ROP ([MS-OXCROPS] section to set the seek pointer. The client then reads data from the stream by sending one or more RopReadStream ROP requests ([MS-OXCROPS] section If the DataSize field of the ROP response buffer is set to the maximum value that was specified in the ROP request buffer, the client can determine whether there is more data in the stream by issuing another RopReadStream request. The client stops reading the stream when it has read all the data it requires or when the server returns zero in the DataSize field.

When the client is done with the Stream object, it releases the Stream object by using the RopRelease ROP ([MS-OXCROPS] section