PreviousNext

IDL Encoding Services Handles

When an application's encoding or decoding operation is invoked, the handle passed to it must be an IDL encoding services handle (the idl_es_handle_t type). The IDL encoding services handle indicates whether encoding or decoding is required, and what style of buffering is to be used. The IDL encoding services provides a set of routines to enable the application code to obtain encoding and decoding handles to the IDL encoding services. The IDL encoding services handle-returning routine you call depends on the buffering style you have chosen:

· If you have selected the incremental encoding style, you call the idl_es_encode_incremental( ) routine, which returns an incremental encoding handle.

· If you have selected the fixed buffer encoding style, you call the idl_es_encode_fixed_buffer( ) routine, which returns a fixed buffer encoding handle.

· If you have selected dynamic buffer encoding, you call the idl_es_encode_dyn_buffer( ) routine, which returns a dynamic buffer encoding handle.

· If you have selected incremental decoding as your buffering style, you call the idl_es_decode_incremental( ) routine, which returns an incremental decoding handle.

· If you have selected the buffer decoding style, you call the idl_es_decode_buffer( ) routine, which returns a buffer decoding handle.

When the encoding or decoding for which an IDL encoding services handle was required is completed, the application code should release the handle resources by calling the idl_es_handle_free( ) routine. See the OSF DCE Application Development Reference for a complete description of the IDL encoding service routines.

It is an error to call an operation for which encode or decode has been specified by using an RPC binding handle, and it is an error to call an RPC operation by using an IDL encoding services handle.

The following restrictions apply to the use of IDL encoding services handles:

· An operation can be called with an encoding handle only if the operation has been given the encode ACF attribute.

· An operation can be called with a decoding handle only if the operation has been given the decode ACF attribute.

· The auto_handle ACF attribute cannot be used with the IDL encoding services.

· The implicit_handle ACF attribute cannot be used with the IDL encoding services.

· Customized handles cannot be used with the IDL encoding services.

· An in context handle does not contain the handle information needed by the IDL encoding services.