3.1.5.2.7 Receiving a CPMFetchValueIn Request

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

  1. Search the ConnectedClientsIdentifiers list for the HANDLE of the named pipe over which the server has received the CPMFetchValueIn message. If it is not present, 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. Call the GetPropertyValueForWorkid abstract interface with the HANDLE of the named pipe over which the server has received the CPMFetchValueIn message, _wid, and Propspec as arguments. If the ValueExists output parameter is not true, the server MUST set _fValueExists (section 2.2.3.16) to 0x00000000; otherwise set _fValueExists (section 2.2.3.16) to 0x00000001. If this step fails for any reason, the server MUST report any error code encountered in performing the request in accordance with Win32 Error Codes in [MS-ERREF].

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

    • Scan the Property output parameter structure, starting from the _cbSoFar offset, and copy a maximum of _cbChunk bytes (do not go past the end of the serialized property) to the vValue field. If this step fails for any reason, the server MUST report an error.

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

    • If the length of the 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.

  6. Report any errors encountered during message preparation or during any abstract interface call to the GSS. Errors that are specific to this request:

    • E_OUTOFMEMORY: generated by any resource allocation failure on the server or service side.

    • STATUS_INVALID_PARAMETER: generated when any of the parameters passed in by the client is invalid. Invalid parameters are those that do not obey the corresponding data structure layout as defined for their types in this document.

    • E_ACCESSDENIED: generated when the client does not have permissions to access a needed resource such as a file result or a catalog.

    • CI_E_BUFFERTOOSMALL: generated when the buffer passed in is too small to accommodate the requested property. This error signals the client to request the potentially large property value separately, using a CPMFetchValueIn request with a larger buffer.

    Any other error code can be returned, but it will be treated as informative only.