OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
typedef [context_handle] void * my_context;
then the rundown procedure is as follows:
void my_context_rundown (my_context this_object);
Server application code that uses a certain context handle may be executing in one or
more server threads at the time that RPC detects that communications between the server
and the client that is using that context have broken. The context rundown routine will
not be invoked until a return of control to the server stub has happened in each of the
threads that were using the context handle.
If application code in any of these threads destroys the context before returning control
to the server stub from which it was called, your context rundown procedure will not be
executed.
17.14.9.3 Creating New Context
When a client makes its first request to the manager to manipulate context, the manager
creates context information and returns this information to the client through a parameter
of the type context_handle. This parameter must be an output parameter or an
input/output parameter whose value is NULL when the call is made. A context handle
can also be a function result.
17.14.9.4 Reclaiming Client Memory Resources for the Context Handle
In the event that a communications error causes the context handle to be unusable, the
resources that maintain the context handle must be reclaimed. Use the
rpc_ss_destroy_client_context( ) routine in the client application to reclaim the client-
side resources and to set the context handle value to NULL.
The syntax of the routine is as follows:
void rpc_ss_destroy_client_context(
void *p_unusable_context_handle);
17.14.9.5 Relationship of Context Handles and Binding
For the client, the context handle specifies the state within a server and also contains
binding information. If an operation has an input context handle or input/output context
handle that is not NULL, it is not necessary to supply any other binding information. A
context handle that has only the in attribute cannot be NULL. If an operation has in,out
context handle parameters but no in context handle parameters, at least one of the in,out
17 62 Tandem Computers Incorporated 124245