3.1.5.2.8 Receiving a CPMFetchValueIn Request

When the server receives a CPMFetchValueIn message request from a client, the server MUST do the following:

  1. Check whether the client has a query associated with it. If this is not the case, the server MUST report a STATUS_INVALID_PARAMETER (0xC000000D) error.

  2. Prepare a CPMFetchValueOut message. If this step fails for any reason, the server MUST report an error.

  3. Find the document indicated by the _wid field and check if this document is available for this client and that this document has the property indicated by property ID in the CFullPropSpec structure. In the case both conditions are true, the server MUST set _fValueExists to 0x00000000, and otherwise set _fValueExists to 0x00000001. The value which is indicated by property ID in the CFullPropSpec structure for that document is referred to later as the "property value". If this step fails for any reason, the server MUST report an error.

  4. If _fValueExists is equal to 0x00000001, the server MUST do the following:

    1. Serialize the property value to a SERIALIZEDPROPERTYVALUE structure and copy, starting from the _cbSoFar offset, at most _cbChunk bytes (but not past the end of the serialized property) to vValue field. If this step fails for any reason, the server MUST report an error.

    2. Set _cbValue to the number of bytes copied in the previous step.

    3. If the length of serialized property is greater than _cbSoFar added to _cbValue, set _fMoreExists to 0x00000001; otherwise, set it to 0x00000000.

  5. Respond to the client with the CPMFetchValueOut message.