Context
Collapse the table of content
Expand the table of content

Context

A context is used in Service Model service operations and callbacks to pass relevant state data to the service operation or callback when it is invoked. A context is referenced by a WS_OPERATION_CONTEXT structure. The properties of a context can be retrieved with the WsGetOperationContextProperty function, as illustrated in the following code.

WS_MESSAGE* requestMessage = NULL;
HRESULT hr = WsGetOperationContextProperty (
                context, 
                WS_OPERATION_CONTEXT_PROPERTY_INPUT_MESSAGE, 
                &requestMessage, 
                sizeof(requestMessage),
                error);

Not all the context properties are available at any given time. See the context property documentation regarding availability of a specific property in a callback or a service operation.

For more information on how to maintain operation context lifetime and threading, see the Operation Context Lifetime and Threading topic.

The following enumeration is part of the context:

The following function is part of the context:

The following handle is part of the context:

 

 

Community Additions

ADD
Show:
© 2016 Microsoft