OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P

[Contents][Index][Back][Next]

4.9.1 dc_clt_code_convert - Converting character codes

Organization of this subsection
(1) Form
(2) Purpose
(3) Arguments set by UAPs
(4) Arguments for which a value is returned
(5) Return values
(6) Note

(1) Form

TP1/Client/W DLL or TP1/Client/P DLL

 
#include <dcvclt.h>
DCLONG dc_clt_code_convert(DCLONG request, 
      char CLTFAR *source, DCULONG CLTFAR *source_len, 
      char CLTFAR *dest, DCULONG CLTFAR *dest_len, 
      DCLONG flags)
 

(2) Purpose

(3) Arguments set by UAPs

(4) Arguments for which a value is returned

(5) Return values

Return Value Value (decimal) Meaning
DC_OK 0 Normal termination
DCCLTER_INVALID_ARGS -2501 Invalid argument
DCCLTER_NO_BUFS -2504 Insufficient memory. The function returns this value also when the specified character length covers the first byte of a two-byte code that is contained in the character string to be converted.
DCCLTER_INVALID_CODE -2550 An invalid code is found in the character string.
DCCLTER_OVERFLOW -2551 The length of the converted character string exceeds the area prepared by the CUP.

(6) Note

When you specify request to be DCCLT_EBCKEIS_TO_JISSJIS and flags to be DCCLT_CNV_TAB or DCCLT_CNV_CNTL, you need to prepare data that contains single-byte tab and control codes.