rpc_rgy_get_max_bytes- obtains the maximum number of encoding bytes used by a code set from the code set registry on a host
#include <dce/rpc.h>
void rpc_rgy_get_max_bytes(
unsigned32 rgy_code_set_value,
unsigned16 *rgy_max_bytes,
error_status_t *status);
Input
- rgy_code_set_value
- The registered hexadecimal value that uniquely identifies the code set.
Output
- rgy_max_bytes
- The registered decimal value that indicates the maximum number of bytes used by the specified code set to encode one character.
- status
- Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.
Possible status codes and their meanings include:
- rpc_s_ok
- Success.
- dce_cs_c_cannot_open_file
Cannot open the code set registry file.
- dce_cs_c_cannot_read_file
Cannot read the code set registry file.
- dce_cs_c_not_found
No local code set name exists in the code set registry.
- dce_cs_c_unknown
Value not found in the code set registry.
The rpc_rgy_get_max_bytes() routine reads the code set registry on the local host and returns the decimal value that indicates the maximum number of bytes that the specified code set uses to encode one character. The routine is used for character and code set interoperability, which permits clients and servers to transfer international character data in a heterogeneous character set and code sets environment.The existing code set conversion buffer sizing routines use the rpc_rgy_get_max_bytes() routine as part of their procedure to determine whether additional storage must be allocated for conversion between local and network code sets. These routines call the rpc_rgy_get_max_bytes() routine once to get the rgy_max_bytes value for the code set to be used to transfer the international character data over the network (the network code set), then call it again to get the rgy_max_bytes value of the local code set, and finally compare the values to determine whether existing buffer space is adequate.
Because the cs_byte_net_size(), cs_byte_local_size(), wchar_t_net_size(), and wchar_t_local_size() buffer sizing routines call the rpc_rgy_get_max_bytes() routine on the caller's client and server applications that call them do not need to call rpc_rgy_get_max_bytes() explicitly. Further character conversion buffer sizing implementations may need to make use of the rpc_rgy_get_max_bytes() routine.
Permissions Required
None.
None.
dce_cs_loc_to_rgy()
dce_cs_rgy_to_loc()
rpc_ns_mgmt_read_code_sets()
rpc_rgy_get_code_sets().
Please note that the html version of this specification may contain formatting aberrations. The definitive version is available as an electronic publication on CD-ROM from The Open Group.
Contents | Next section | Index |