Control Object

The control object is used by the client to cancel a server call that is taking too long to return any result to the client. A control object is an object which is created on the server side when a client registers some heavy operations such as subscription or query. The following example shows a typical workflow such as a subscription or a query:

  1. A client tries to register a query job by calling EvtRpcRegisterLogQuery (as specified in section

  2. That method returns a control object through the PCONTEXT_HANDLE_OPERATION_CONTROL context handle (as specified in section

  3. The client issues the call EvtRpcQueryNext (as specified in section to query the events, and this operation takes a long time before returning a result to the client. If the client wants to abandon the operation, it can call EvtRpcCancel (as specified in section to cancel the query operation by providing the context handle it receives from the server in the first step.

  4. Since this protocol describes only one cancel operation for the control object, the control object SHOULD keep the pointer of the operation object, such as a subscription, and a Boolean flag to indicate whether the operation is canceled or not.

For information on how many types of operations can be canceled, see section