PreviousNext

rpc_rgy_get_codesets(3rpc)

Gets supported code sets information from the local host

Used by client and server applications.

Synopsis

#include <dce/rpc.h>

void rpc_rgy_get_codesets(

rpc_codeset_mgmt_p_t *code_sets_array,

error_status_t *status);

Parameters

Input

No input is required.

Output

code_sets_array
An integer array that specifies the code sets that the client's or server's host environment supports. Each array element is an integer value that uniquely identifies one code set.

status
Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.

Description
The rpc_rgy_get_codesets( ) 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.

The rpc_rgy_get_codesets( ) routine examines the locale environment of the host on which the client or server process is running to determine the local code set currently in use by the client or server process and the set of supported code set conversion routines that exist on the host into which the client or server process can convert if necessary. It then reads the code sets registry on the local host to retrieve the unique identifiers associated with these supported code sets.

The routine returns a code sets array. The set of values returned in this structure correspond to the process's local code set and the code sets into which processes that run on this host can convert. The array also contains, for each code set, the maximum number of bytes that code set uses to encode one character (c_max_bytes).

Server applications use the rpc_rgy_get_codesets( ) routine in their initialization code to get their host's supported character and code sets values in order to export them into the name service database with rpc_ns_mgmt_set_attribute( ).

Client applications use the rpc_rgy_get_codesets( ) routine during the server binding selection process to retrieve the supported character and code sets at their host in order to evaluate them against the character and code sets that a server supports. Client applications that use the evaluation routines rpc_cs_eval_with_universal( ) and rpc_cs_eval_without_universal( ) do not need to call this routine explicitly, because these code sets evaluation routines call it on the client's behalf. Application developers who are writing their own character and code set evaluation routines may need to include rpc_rgy_get_codesets( ) in their user-written evaluation routines.

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.

dce_cs_c_cannot_open_file

dce_cs_c_cannot_read_file

rpc_s_ok

rpc_s_no_memory

Related Information
Commands: csrc(8dce) in OSF DCE Command Reference

Functions: rpc_ns_mgmt_read_codesets(3rpc)

rpc_ns_mgmt_remove_attribute(3rpc)

rpc_ns_mgmt_set_attribute(3rpc)