UniUconvFromUcs

Convert a UCS string to code page characters.

Syntax
UniUconvFromUcs(uconvObj, ucsBuffer, ucsBufferLen, outBuff, outBuffLen, nonIdenticalConv);

Parameters

 * uconvObj - UconvObject - input : The conversion object created from UniCreateUconvObject.
 * ucsBuffer - UniChar - input : The input buffer.
 * ucsBufferLen - (size_t *) - input/output : The input buffer's length, in bytes.
 * outBuff - (void **) - output : The output buffer.
 * outBuffLen - (size_t *) - output : Number of code page character elements in the outBuff.
 * nonIdenticalConv - (size_t *) - output : Number of non-identical conversions.

Returns
An integer with values of:


 * ULS_BUFFERFULL
 * ULS_ILLEGALSEQUENCE
 * ULS_INVALID
 * ULS_SUCCESS

UniUconvFromUcs updates the variables pointed to by the arguments to reflect the extent of the conversion and returns, in nonidentical, the number of substitution (nonidentical conversions) performed. If the entire string in the input buffer is converted, the value pointed to by ucsBufferLen will be 0. If the input conversion is stopped due to any condition mentioned above, the value pointed to by ucsBufferLen will be nonzero. If any error occurs, UniUconvToUcs returns a nonzero value.

Calling Convention
Cdecl32

Example Code
UconvObject uconvObj; UniChar    ucsBuffer; size_t*    ucsBufferLen; void**     outBuff; size_t*    outBuffLen; size_t*    nonIdenticalConv; integer    rc; ... rc = UniUconvFromUcs(uconvObj, ucsBuffer, ucsBufferLen, outBuff, outBuffLen, nonIdenticalConv); ...

OS Version Introduced
OS/2 Warp

Related Functions

 * UniConvToUcs
 * UniStrFromUcs
 * UniStrToUcs