OSF DCE Application Development Guide--Core Components
OSF DCE Application Development Guide—Core Components
[cs_tag_rtn(tag_set_routine)] operation_name ([parameter_list]);
When used as an ACF interface attribute, the cs_tag_rtn attribute applies to all
operations defined in the corresponding IDL file. When used as an ACF operation
attribute, the cs_tag_rtn attribute applies only to the operation you specify.
The tag_set_routine is the name of the stub support routine that the client and server
stubs will call to set the operation’s code set tag parameters. The IDL compiler will
generate a function prototype for tag_set_routine in the generated header file.
Applications can specify the DCE RPC tag-setting routine rpc_cs_get_tags( ) if it meets
their applications’ needs, or they can write their own tag-setting routines. The routine
name must be distinct from any type name, procedure name, constant name, or
enumeration name appearing in the interface definition. It must also have a specific
calling signature. See the rpc_cs_get_tags(3rpc) reference page for a complete
description of the required routine signature.
When the tag-setting routine is called from a client stub, it is called before any in
parameters are marshalled. When called from a server stub, it is called before any out
parameters are marshalled. For more information on the cs_tag_rtn attribute and its use
in internationalized RPC applications, see Chapter 15 of this guide.
Example Using the cs_tag_rtn Attribute
As shown in the following example, the cs_tag_rtn attribute is used in conjunction with
the cs_char, cs_stag, cs_drtag, and cs_rtag ACF attributes. In the example, the stub
generated for a_op will call the tag-setting routine set_tags to set the code set tag
parameters to specific values before any data is marshalled. For b_op,itisthe
responsibility of the operation’s caller to ensure that the code set tag parameters are set
correctly before any data is marshalled.
IDL File
typedef byte my_byte;
void a_op(
[in] unsigned long stag,
[in] unsigned long drtag,
[out] unsigned long *p_rtag,
[in] long s,
[in, out] long *p_l,
[in, out, size_is(s), length_is(*p_l)] my_byte a[]
);
void b_op(
[in] unsigned long stag,
[in] unsigned long drtag,
[out] unsigned long *p_rtag,
[in] long s,
[in, out] long *p_l,
[in, out, size_is(s), length_is(*p_l)] my_byte a[]
);
18 − 26 Tandem Computers Incorporated 124245