3.1.1.5 PCONTEXT_HANDLE_TYPE RPC Context Handle
The PCONTEXT_HANDLE_TYPE represents the server's state associated with an in-progress directory query.
A protocol client acquires a PCONTEXT_HANDLE_TYPE RPC context handle through a call to the S_DSLookupBegin method and releases the context handle through a call to S_DSLookupEnd.
Each instance of this RPC context handle represents internal state that the server needs to maintain. The server SHOULD register a rundown method to close these RPC context handles in the event that the client fails to call the S_DSLookupEnd method. See section 3.1.6.2.
The server MUST retain the following state for each in-progress directory query operation.
The result set MUST be the set of directory objects that satisfy the query specified by the client. In particular:
The objects returned MUST satisfy all of the restrictions in the pRestriction parameter.
The properties returned for each object MUST be limited to only those specified in the pColumns parameter.
The objects MUST be returned in the order specified in the pSort parameter.
An index into the result set that represents the directory object returned in the previous call to S_DSLookupNext.
For more information, see S_DSLookupBegin (section 3.1.4.17).
The server MUST retain this information until the client closes the context handle through a call to the S_DSLookupEnd method, or until the RPC context handle rundown occurs.