VMS Help DCE_RPC, Application Routines, rpc_rgy_get_max_bytes *Conan The Librarian (sorry for the slow response - running on an old VAX) |
NAME rpc_rgy_get_max_bytes - Gets the maximum number of bytes that a code set uses to encode one character from the code set registry on a host Used by client and server applications. SYNOPSIS #include <dce/rpc.h> void rpc_rgy_get_max_bytes( unsigned32 rgy_code_set_value, unsigned16 *rgy_max_bytes, error_status_t *status ); PARAMETERS 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 number of bytes this code set uses 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. The possible status codes and their meanings are as follows: dce_cs_c_cannot_open_file dce_cs_c_cannot_read_file dce_cs_c_notfound dce_cs_c_unknown rpc_s_ok DESCRIPTION The rpc_rgy_get_max_bytes() 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_max_bytes() routine reads the code set registry on the local host. It takes the specified registered code set value, uses it as an index into the registry, and returns the decimal value that indicates the number of bytes that the code set uses to encode one character. The DCE RPC stub support routines for buffer sizing use the rpc_rgy_get_max_bytes() routine as part of their procedure to determine whether additional storage needs to be allocated for conversion between local and network code sets. The DCE RPC stub support 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 data over the network (the "network" code set) then call the routine again to get the rgy_max_bytes value of their local code set. The stubs then compare the two values to determine whether or not additional buffers are necessary or whether the conversion can be done "in place". Client and server applications that use the DCE RPC buffer sizing routines byte_net_size(), byte_local_size(), wchar_t_net_size(), and wchar_t_local_size() do not need to call this routine explicitly because these DCE RPC stub support routines call it on their behalf. Application programmers who are developing their own stub support routines for buffer sizing can use the rpc_rgy_get_max_bytes() routine in their code to get code set max_byte information for their user- written buffer sizing routines. Permissions Required No permissions are required. RETURN VALUES No value is returned. RELATED INFORMATION Commands: csrc. Functions: dce_cs_loc_to_rgy dce_cs_rgy_to_loc rpc_ns_mgmt_read_code_sets rpc_rgy_get_code_sets
|