OSF DCE Application Development Guide--Core Components
Interface Definition Language
context handle parameters cannot be NULL. However, if the only context handle
parameters in an operation are output, they carry no binding information. In this case,
you must use another method to bind the client to a server.
If you specify multiple context handles in an operation, all active context handles must
map to the same remote address space on the same server or the call fails. (A context
handle is active while it represents context information that the server maintains for the
client. It is inactive if no context has yet been created, or if the context is no longer in
use.)
17.14.9.6 Rules for Using Context Handles
The following rules apply to using context handles:
• A context handle can be a parameter or a function result. You cannot use context
handles as an array element, as a structure or union member, or as the element type
of a pipe.
• A context handle cannot have the transmit_as or ptr attributes.
• An input-only context handle cannot be NULL.
• A context handle cannot be pointed to, except by a top-level reference pointer.
17.14.9.7 Examples Using Context Handles
The following examples show a sample IDL file that uses context handles and a sample
context rundown procedure file.
Example of an IDL File That Uses a Context Handle
/*
* Filename: context_handle.idl
*/
[uuid(f38f5080-2d27-11c9-a96d-08002b0ecef1),
pointer_default(ref), version (1.0)]
interface files
{
/* File context handle type */
typedef [context_handle] void * file_handle_t;
/* File specification type */
typedef [string] char * filespec_t;
/* File read buffer type */
typedef [string] char buf_t[*];
/*
* The file_open call requires that the client has located a
* file server interface files and that an RPC handle that is
124245 Tandem Computers Incorporated 17− 63