3.2.4.9 Peek a Message by Using a Cursor

The message queuing application MUST specify the QUEUE_CONTEXT_HANDLE_NOSERIALIZE (section 2.2.4.1) RPC context handle of the queue to be read from, the cursor handle, the time-out parameter for the operation, a maximum message body size, and an action from the table in the description of the ulAction parameter of the R_StartReceive (Opnum 7) (section 3.1.4.7) method with an action type of Peek.

  • The client MUST call the R_StartReceive method and MUST specify the following parameter values:

    • hCursor set to the value specified by the message queuing application.

    • LookupId set to NULL.

    • ulAction set to the action specified by the message queuing application.

    • ulTimeout set to the time-out value specified by the message queuing application.

    • dwMaxBodySize set to the value specified by the message queuing application.

    • dwRequestId set to a value that uniquely identifies this call from all other pending calls to this protocol.

  • The client MUST reconstruct the message from the SectionBuffers (section 2.2.6) structure received in the ppPacketSections parameter, as specified in section 3.1.4.7.

  • The client MUST return the message to the message queuing application.