3.1.5.2.4 Receiving a CPMGetQueryStatusExIn Request

If the server receives a CPMGetQueryStatusExIn 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. Check whether the cursor (1) handle passed is in a list of the client's cursor handles. If this is not the case, the server MUST report an E_FAIL (0x80004005) error.

  3. Prepare a CPMGetQueryStatusExOut message. The server MUST retrieve the current query status and query progress and set _Status (see CPMGetQueryStatusOut for possible values), _dwRatioFinishedDenominator, and _dwRatioFinishedNumerator respectively. The server MUST then set the number of rows in the query results to _cRowsTotal. If this step fails for any reason, the server MUST report that an error was encountered.

  4. Retrieve information about the client's catalog and fill in _cFilteredDocuments and _cDocumentsToFilter. If this step fails for any reason, the server MUST report that an error was encountered.

  5. Retrieve the position of the bookmark indicated by the handle in the _bmk field, and fill the remaining _iRowBmk  field in the CPMGetQueryStatusExOut message. If this step fails for any reason, the server MUST report that an error was encountered.

  6. Respond to the client with the CPMGetQueryStatusExOut message.