PreviousNext

idl_es_encode_dyn_buffer(3rpc)

Returns a dynamic buffer encoding handle to the IDL encoding services

Used by client and server applications.

Synopsis

void idl_es_encode_dyn_buffer(

idl_byte **encoded_data_buffer,

idl_ulong_int *buffer_size,

idl_es_handle_t *es_handle,

error_status_t *status);

Parameters

Input

None.

Output

encoded_data_buffer
The address to which the IDL encoding services will write the address of the buffer that contains the encoded data, when the encoding process is complete. When the application no longer needs the buffer, it should release the memory resource. See the OSF DCE Application Development Guide - Core Components for an explanation of how to manage memory when using the IDL encoding services.

buffer_size
The address to which the IDL encoding services will write the size of the buffer that contains the encoded data, when the encoding process is complete.

es_handle
Returns the address of an IDL encoding services handle for use by a client or server encoding operation.

status
Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.

Description
The IDL encoding services provide client and server RPC applications with a method for encoding data types in input parameters into a byte stream and decoding data types in output parameters from a byte stream without invoking the RPC runtime. Encoding and decoding operations are analogous to marshalling and unmarshalling, except that the data is stored locally, and is not transmitted over the network. Client and server applications can use the IDL encoding services to create persistent storage for their data. Encoding "flattens" complex data types into a byte stream for storage on disk, while decoding restores the flattened data to complex form.

The idl_es_encode_dyn_buffer( ) routine belongs to a set of routines that return handles to the IDL encoding services for use by client and server encoding and decoding operations. The information in the handle controls the way in which the IDL encoding services manage memory when encoding or decoding data.

The idl_es_encode_dyn_buffer( ) routine returns a dynamic buffer encoding handle, which directs the IDL encoding services to store the encoded data in a chain of small buffers, build an additional single buffer that contains the encoded data, and pass that buffer's address to the application. Dynamic buffering is the most expensive style of IDL encoding services buffering, since two copies of the encoded data exist (one in the chain of buffers, and one in the single buffer).

Return Values
None.

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

rpc_s_ok
Success.

rpc_s_ss_bad_buffer
Bad buffer operation.

rpc_s_no_memory
Insufficient memory available to complete operation.

Related Information
Functions: idl_es_encode_fixed_buffer(3rpc)

idl_es_encode_incremental(3rpc)