PreviousNext

The cs_stag, cs_drtag, and cs_rtag Attributes

The cs_stag, cs_drtag and cs_rtag attributes are used in conjunction with the cs_char and (optionally) the cs_tag_rtn attributes and DCE RPC routines for automatic code set conversion to provide internationalized RPC applications with a mechanism to ensure character and code set interoperability between clients and servers handling international character data.

The cs_stag, cs_drtag and cs_rtag attributes are parameter ACF attributes that correspond to the sending tag, desired receiving tag, and receiving tag parameters defined in operations in the IDL file that handle international character data. These operation parameters tag international characters being passed in the operation's input and output parameters with code set identifying information. The cs_stag, cs_drtag and cs_rtag ACF parameter attributes declare the tag parameters in the corresponding operation definition to be special code set parameters.

The cs_stag attribute has the following syntax:

operation_name ([cs_stag] parameter_name);

The cs_stag attribute identifies the code set used when the client sends international characters to the server. Operations defined in the IDL file that specify international characters in in parameters must use the cs_stag attribute in the associated ACF.

The cs_drtag attribute has the following syntax:

operation_name ([cs_drtag] parameter_name);

The cs_drtag attribute identifies the code set the client would like the server to use when returning international characters.

The cs_rtag attribute has the following syntax:

operation_name ([cs_rtag] parameter_name);

The cs_rtag attribute identifies the code set that is actually used when the server sends international characters to the client. Operations defined in the IDL file that specify international characters in out parameters must apply the cs_rtag attribute in the associated ACF.

Example Using the cs_stag, cs_drtag, and cs_rtag Attributes

Here is an example ACF for an IDL file in which the operation my_op has the tag parameters my_stag, my_drtag, and my_rtag, whose types are either unsigned long or [ref] unsigned long.

my_op( [cs_stag] my_stag, [cs_drtag] my_drtag, [cs_rtag] my_rtag);

For more information about the cs_stag, cs_drtag, and cs_rtag ACF attributes and their use in internationalized RPC applications, see Writing Internationalized RPC Applications.