subcalls.hlp (Topic list)
VioGetCp (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_VIO
 
USHORT VioGetCp(usReserved, pIdCodePage, hvio)
USHORT usReserved;      /* must be zero                    */
PUSHORT pIdCodePage;    /* pointer to code-page identifier */
HVIO hvio;              /* video handle                    */
 
The VioGetCp function retrieves the identifier of the code page for the
current screen group. This code page defines the character set being used to
display text on the screen. If the identifier is 0x0000, the system default
code page is being used. Any other value identifies a code page that has
been set by using the VioSetCp function or that has been inherited from the
parent process.
 
Parameter    Description
────────────────────────────────────────────────────────────────────────────
 
usReserved   Specifies a reserved value. This parameter must be zero.
 
pIdCodePage  Points to the variable that receives the code-page identifier.
             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 the following:
 
     ERROR_VIO_INVALID_HANDLE
 
Example
 
This example calls VioGetCp to retrieve the current system code page:
 
USHORT idCodePage;
VioGetCp(0,             /* must be zero         */
    &idCodePage,        /* code-page identifier */
    0);                 /* video handle         */
 
See Also
 
VioSetCp, VioCreatePS