rpc_cs_get_tags(3rpc)Retrieves code set tags from a binding handle; used by client and server applications Synopsis #include <dce/codesets_stub.h> void rpc_cs_get_tags( rpc_binding_handle_t binding, boolean32 server_side, unsigned32 *sending_tag, unsigned32 *desired_receiving_tag, unsigned32 *receiving_tag, error_status_t *status); Parameters Input
binding
server_side
desired_receiving_tag Output
sending_tag
desired_receving_tag
receiving_tag
status · rpc_rgy_get_codesets( ) · rpc_ns_binding_inq_entry_name( ) · rpc_ns_mgmt_read_codesets( )
Description The rpc_cs_get_tags( ) routine is a DCE RPC routine that RPC stubs can use to retrieve the code set values to be used to tag' international character data to be sent over the network. In general, the code set values to be used as tags are determined by a character and code sets evaluation routine, which is invoked from the client application code. However, application programmers can use other methods to establish values for code set tags. RPC stubs call the rpc_cs_get_tags( ) routine before they call the buffer sizing routines *_net_size( ) and the code set conversion routines _netcs( ). The rpc_cs_get_tags( ) routine provides the stubs with code set values to use as input to the buffer sizing routines (to determine whether or not buffer storage needs to be allocated for conversion) and as input to the code set conversion routines (to determine whether conversion is necessary, and if so, which host code set converter to invoke). Client and server stubs call the rpc_cs_get_tags( ) routine before they marshall any data. When called from the client stub, the boolean value server_side is set to FALSE to indicate that the client stub has invoked the routine. The binding handle is the handle to a compatible server returned by the rpc_ns_binding_import_next( ) or rpc_ns_binding_select( ) routines. If the client has added a code sets evaluation routine to the binding import procedure (by calling the routine rpc_ns_import_ctx_add_eval( )), the binding handle will contain the conversion method and the code set values to set for the client's sending tag and desired receiving tag. If the binding handle does not contain the results of an evaluation, the rpc_cs_get_tags( ) routine will perform the character/code sets evaluation within the client stub and set the client code set tag values itself. On the client side, the output of the routine is the code set value that represents the client's sending tag and the code set value that represents the client's desired receiving tag. If the conversion method is "client makes it right'' (CMIR), the sending tag and desired receiving tags will be set to the code set value of the server's local code set. If the conversion method is "server makes it right'' (SMIR), the sending tag and desired receiving tag will be set to the client's local code set value. If the conversion method is "receiver makes it right'' (RMIR), the sending tag is the client's code set, and the desired receiving tag is the server's code set. When called from the server stub, the boolean value server_side is set to TRUE to indicate that the server stub has invoked the routine. The server stub specifies the code set value given in the client's desired receiving tag as input to the routine. The rpc_cs_get_tags( ) routine sets the code set value in desired_receiving_tag to receiving_tag and returns this value as output to the server stub. The server stub will then use the code set value in receiving_tag as the code set to use for data it sends back to the client. Application programmers who want their applications to use the rpc_cs_get_tags( ) routine to retrieve code set tag information as part of the automatic code set conversion process specify the routine name as the argument to the ACF attribute cs_tag_rtn when developing their internationalized RPC application. Application programmers can also write their own code set tags retrieval routine that RPC stubs can call; in this case, they specify the name of this routine as the argument to the ACF attribute cs_tag_rtn instead of specifying the DCE RPC routine rpc_cs_get_tags( ). Application programmers can also use the automatic code conversion mechanism, but design their applications so that the code set tags are set explicitly in the application instead of in the stubs.
Permissions Required
Return Values 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
rpc_s_ss_invalid codeset tag
Related Information Book: OSF DCE Application Development Guide - Core Components
|