OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
If you use the represent_as attribute, you must write routines that perform the
conversions between the local and network types, and routines that release the memory
storage used to hold the converted data. The conversion routines are part of your
application code.
The suffix for the routine names, the function of each, and where they are used (client or
server) appear in the following list:
_from_local(): Allocates storage instance of the network type and converts from the
local type to the network type (used for client and server).
_to_local( ): Converts from the network type to the local type (used for client and
server).
_free_inst(): Frees storage instance used for the network type (used by client and
server).
_free_local( ): Frees storage used by the server for the local type (used in server).
This routine frees any object pointed to by its argument but does not attempt to free
the argument itself.
Suppose that the represent_as attribute is applied to either the type of a parameter or to
a component of a parameter and that the parameter has the out or in,out attribute. Then,
the _free_local( ) routine will be called automatically for the data item that has the type
to which the represent_as attribute was applied.
Suppose that the represent_as attribute is applied to the type of a parameter and that the
parameter has only the in attribute. Then, the _free_local( ) routine will be called
automatically.
Finally, suppose that the represent_as attribute is applied to the type of a component of
a parameter and that the parameter has only the in attribute. Then, the _free_local()
routine will not be called automatically for the component; the manager application
code must release any resources that the component uses, possibly by explicitly calling
the _free_local() routine.
Append the suffix of the routine name to the net_type_name. The syntax for these
routines is as follows:
void net_type_name_from_local (
(local_type_name *),
(net_type_name **))
void net_type_name_to_local (
(net_type_name *),
(local_type_name *))
void net_type_name_free_inst ((net_type_name *))
void net_type_name_free_local ((local_type_name *))
18 14 Tandem Computers Incorporated 124245