This function is used to allocate and initiate the CORBA_Environment structure. In particular, it is used to dynamically allocate a CORBA_Environment structure and set the default values for the structure's fields.
inbufsize is the initial size of the input buffer.
outbufsize is the initial size of the output buffer.
CORBA_Environment is the CORBA 2.0 state structure used by the generated stub.
This function will set all needed default values and allocate buffers the lengths of which are equal to the values passed, but will not allocate space for the _to_pid and _from_pid fields.
To free the space allocated by CORBA_Environment_alloc() do as follows.
-
First call CORBA_free for the input and output buffers.
-
After freeing the buffer space, call CORBA_free for the CORBA_Environment space.