subcalls.hlp (Topic list)
VioGetAnsi (1.2)
Overview                                            Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_VIO
 
USHORT VioGetAnsi(pfAnsi, hvio)
PUSHORT pfAnsi;    /* pointer to variable for ANSI flag  */
HVIO hvio;         /* video handle                       */
 
The VioGetAnsi function retrieves the state of the ANSI flag, which
determines whether the processing of ANSI escape sequences is enabled or
disabled.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
pfAnsi     Points to the variable that receives the ANSI flag. If this flag
           is ANSI_ON, ANSI processing is enabled. If the flag is ANSI_OFF,
           ANSI processing is disabled.
 
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 VioGetAnsi and, if ANSI processing enabled, calls the
VioWrtTty function to display a message:
 
USHORT fAnsi;
VioGetAnsi(&fAnsi, 0);
if (fAnsi == ANSI_ON)
    VioWrtTTY("ANSI is on\n\r", 12, 0);
 
See Also
 
VioSetAnsi, VioWrtTTY, VioCreatePS