subcalls.hlp (Topic list)
VioSetCp (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_VIO
 
USHORT VioSetCp(usReserved, idCodePage, hvio)
USHORT usReserved;    /* must be zero         */
USHORT idCodePage;    /* code-page identifier */
HVIO hvio;            /* video handle         */
 
The VioSetCp function sets the code page for the current screen group. The
code page defines the character set used to display characters on the
screen.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
usReserved  Specifies a reserved value; must be zero.
 
idCodePage  Specifies the code-page identifier. This parameter can be any
            code-page identifier specified in the codepage command line in
            the config.sys file. If this parameter is 0x0000, the function
            uses the system default code page. The following are the valid
            code-page numbers:
 
            Number  Code page
            ────────────────────────────────────────────────────────────────
            437     United States
 
            850     Multilingual
 
            860     Portuguese
 
            863     French-Canadian
 
            865     Nordic
 
hvio        Identifies an advanced video-input-and-output (AVIO)
            presentation space. For AVIO programs, this handle must have
            been created previously using the VioCreatePS function. For
            other programs, hvio must be NULL.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
 
     ERROR_VIO_BAD_CP
     ERROR_VIO_INVALID_HANDLE
 
Example
 
This example calls VioSetCp to set the current system code page to the
standard United States code page:
 
if (VioSetCp(0,       /* must be zero         */
        437,          /* code-page identifier */
        0)) {         /* video handle         */
    VioWrtTTY("Code page not specified in CONFIG.SYS\n\r", 39, 0);
 
See Also
 
VioCreatePS, VioGetCp