126.96.36.199 Receiving a CPMCreateQueryIn Request
When the protocol server receives a CPMCreateQueryIn message request from a protocol client, the protocol server MUST do the following:
Check if the protocol client is in the list of connected clients. If this is not the case, the protocol server MUST report a STATUS_INVALID_PARAMETER (0xC000000D) error.
Check if the protocol client already has a search query associated with it. If this is the case, the protocol server MUST report a STATUS_INVALID_PARAMETER (0xC000000D) error.
Parse the restriction set, sort orders, and groupings that are specified in the search query. If the protocol server encounters an error, it MUST report an appropriate error. If this step fails for any other reason, the protocol server MUST report the error encountered. For information about query server query errors, see [MSDN-QUERYERR].
Save the search query in the state for the protocol client.
Make any preparations required to serve rows to a protocol client and associate the search query with new cursor handles. The cursor handles MUST be returned to the protocol client in a CPMCreateQueryOut response.
Initialize the number of rows to the currently calculated number of rows. This number can be zero if the search query did not start to execute, or some number if the search query is in a process of execution. Initialize the numerator and denominator of the search query completion.
Respond to the protocol client with a CPMCreateQueryOut message.