PreviousNext

rpc_cs_binding_set_tags(3rpc)

Places code set tags into a server binding handle

Used by client applications.

Synopsis

#include <dce/rpc.h>

void rpc_cs_binding_set_tags(

rpc_binding_handle_t *binding,

unsigned32 sending_tag,

unsigned32 desired_receiving_tag,

unsigned16 sending_tag_max_bytes,

error_status_t *status);

Parameters

Input/Output

binding
On input, specifies the server binding handle to modify with tag information. This handle is the binding handle returned by the rpc_ns_binding_import_next( ) or rpc_ns_binding_select( ) routine. On output, returns the server binding handle modified with code set tag information. The server stub retrieves the tag information from the binding handle and uses it to invoke the appropriate buffer sizing and code set conversion routines.

Input

sending_tag
Specifies the code set value for the code set in which client data to be sent to the server is to be encoded. If the client is not sending any data, set this value to the client's current code set. This step prevents the code set conversion routine from being invoked.

desired_receiving_tag
Specifies the code set value for the code set in which the client prefers data to be encoded when sent back from the server. If the client is not planning to receive any data from the server, set this value to the server's current code set. This step prevents the code set conversion routine from being invoked.

sending_tag_max_bytes
Specifies the maximum number of bytes that a code set requires to encode one character. The value is the c_max_bytes value associated with the code set value (c_set) used as the sending_tag value.

Output

status
Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not. The routine can also return status codes generated by the rpc_rgy_get_codesets( ) routine.

Description
The rpc_cs_binding_set_tags( ) routine belongs to a set of DCE RPC routines for use by client and server applications that are transferring international character data in a heterogeneous character set and code sets environment. These routines are used to enable automatic code set conversion between client and server for character representations that are not part of the DCE Portable Character Set.

Client applications use the rpc_cs_binding_set_tags( ) routine to add code sets tag information to the binding handle of a compatible server. The tag information specified in the routine is usually obtained from a character and code sets evaluation routine (which is typically a user-written routine).

The sending_tag value identifies the code set encoding that the client is using to send international character data to the server. The desired_receiving_tag value indicates to the server the code set that the client prefers the server to use when sending return international character data. The sending_tag_max_bytes value is the number of bytes the sending code set uses to encode one character.

Client applications that use the rpc_cs_eval_with_universal( ) or rpc_cs_eval_without_universal( ) routines do not need to call this routine because these routines set tag information in the server binding handle as part of their operation. Application developers who are writing their own character and code sets evaluation routines need to include code that sets tags in a server binding handle. The rpc_cs_binding_set_tags( ) routine provides this function and can be used in user-written evaluation routines, or alone if the application does not need to perform evaluation. In this case, the routine provides a short cut for application programmers whose applications do not need to evaluate for character and code set compatibility.

Permissions Required
No permissions are required.

Return Values
No value is returned.

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_no_memory

Related Information
Functions: rpc_cs_eval_with_universal(3rpc)

rpc_cs_eval_without_universal(3rpc)

rpc_cs_get_tags(3rpc)