3.1.5.4 Receiving a CPMFetchValueIn Request
When the protocol server receives a CPMFetchValueIn message request from a protocol client, the protocol server MUST do the following:
Check if the protocol client has a query associated with it. If this is not the case, the protocol server MUST report a STATUS_INVALID_PARAMETER (0xC000000D) error.
Prepare a CPMFetchValueOut message. If this step fails for any reason, the protocol server MUST report the error encountered, which is an HRESULT or an NTSTATUS value (see section 1.8).
Set _fValueExists to 0x00000001.
Set vType to 0x41 (VT_BLOB).
The protocol server MUST store the ignored terms of the search query into a CBaseStorageVariant with vType VT_VECTOR | VT_LPWSTR. The server MUST use VT_VECTOR | VT_LPWSTR with zero elements if there were no ignored terms.
The protocol server MUST store any spelling suggestions of the query terms into a CBaseStorageVariant with vType VT_LPWSTR. MUST contain space-delimited keywords and any keywords which are spelling suggestions MUST be prefixed with "<suggestion>" and post fixed with "</suggestion>". If there are no spelling suggestions then vValue MUST contain a null-terminated empty VT_LPWSTR.
The protocol server MUST store the query terms into a CBaseStorageVariant with vType VT_VECTOR | VT_LPWSTR. The protocol server MUST use VT_VECTOR | VT_LPWSTR with zero elements if there were no query terms.
For each query term the protocol server MUST determine a term identifier or 0x0000000. The protocol server MUST store the term identifiers into a CBaseStorageVariant with vType VT_VECTOR | VT_UI4.
The protocol server MUST serialize the estimated total number of results for the search query into a 32-bit value. The protocol server MUST then:
Serialize the values of the CBaseStorageVariants and 32-bit value from steps 0-0 to a QUERYMETADATA 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 protocol server MUST report an error.
Set _cbValue to the size of theĀ sent.
If the length of serialized property is greater than _cbSoFar added to _cbValue, set _fMoreExists to 0x00000001; otherwise, set it to 0x00000000.
Respond to the protocol client with the CPMFetchValueOut message.