wchar_t_from_netcs(3rpc)Converts international character data from a network code set to a local code set prior to unmarshalling; used by client and server applications Synopsis #include <dce/codesets_stub.h> void wchar_t_from_netcs( rpc_binding_handle_t binding, unsigned32 network_code_set_value, idl_byte *network_data, unsigned32 network_data_length, unsigned32 local_buffer_size, wchar_t *local_data, unsigned32 *local_data_length, error_status_t *status); Parameters Input
binding
network_code_set_value
network_data
network_data_length
local_buffer_size Output
local_data
local_data_length
status
Description The wchar_t_from_netcs( ) routine is one of the DCE RPC stub code set conversion routines that RPC stubs use before they marshall or unmarshall data to convert international character data to and from local and network code sets. Client and server stubs call the wchar_t_*_netcs routines when the wchar_t type has been specified as the local data type using the cs_char attribute in the attribute configuration file for the application. Client and server stubs call the wchar_t_from_netcs( ) routine before they unmarshall the international character data received from the network. The routine takes a binding handle, a code set value that identifies the code set used to transfer international character data over the network, the address of the network data, in idl_byte format, that may need to be converted, and the data length, in units of idl_byte. The routine compares the sending code set to the local code set currently in use. If the routine finds that code set conversion is necessary, (because the local code set differs from the code set specified to be used on the network), it determines which host code set converter to call to convert the data and then invokes that converter. The routine then returns the converted data, in wchar_t format. If the data is a conformant or conformant varying array, the routine also returns the length of the converted data, in units of wchar_t. Prior to calling wchar_t_from_netcs( ), client and server stubs call the wchar_t_local_size( ) routine to calculate the size of the buffer required to hold the converted data. Because wchar_t_local_size( ) cannot make this calculation for fixed and varying arrays, applications should either restrict use of wchar_t_from_netcs( ) to conformant and conformant varying arrays, or independently ensure that the buffer allocated for converted data is large enough. Applications can specify local data types other than cs_byte and wchar_t (the local data types for which DCE RPC supplies stub code set conversion routines) with the cs_char ACF attribute. In this case, the application must also supply local_type_to_netcs( ) and local_type_from_netcs( ) stub conversion routines for this type.
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_incompatible codesets When the routine is running the host converter routines, the following errors can be returned: · rpc_s_ss_invalid_char_support · rpc_s_ss_short_conv_buffer When invoked from the server stub, the routine calls the dce_cs_loc_to_rgy( ) routine and the host converter routines. If one of these routines returns an error, an exception is raised to the client application.
Related Information
|