win12.hlp (Table of Contents; Topic list)
WinCpTranslateString (1.2)
Function Group                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINCOUNTRY
 
BOOL WinCpTranslateString(hab, cpSrc, pszSrc, cpDst, cchDestMax,
    pszDest)
HAB hab;              /* handle of the anchor block              */
USHORT cpSrc;         /* code page source string                 */
PSZ pszSrc;           /* address of string to be translated      */
USHORT cpDst;         /* code page of resultant string           */
USHORT cchDestMax;    /* maximum length of output string         */
PSZ pszDest;          /* address of buffer for translated string */
 
The WinCpTranslateString function translates a string from one code page to
another. Both source and destination strings are null terminated.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
hab         Identifies the anchor block.
 
cpSrc       Specifies the code page of the source string.
 
pszSrc      Points to the string to be translated.
 
cpDst       Specifies the code page of the resultant string.
 
cchDestMax  Specifies the maximum length of the output string.
 
pszDest     Points to the buffer to receive the translated string.
 
Return Value
 
The return value is TRUE if the function is successful or FALSE if an error
occurs. A return value of TRUE indicates that most, if not all, characters
were translated successfully. All untranslated characters are converted to
0xFF.
 
See Also
 
WinCpTranslateChar