subcalls.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
VioGetMode (1.2)
Overview  Changes                                 Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_VIO
 
USHORT VioGetMode(pviomi, hvio)
PVIOMODEINFO pviomi;  /* pointer to structure for screen-mode information */
HVIO hvio;            /* video handle                                     */
 
The VioGetMode function retrieves the current screen mode. The screen mode
defines the display mode (text or graphics), the number of colors being used
(2, 4, or 16), and the width and height of the screen in both character
cells and pels.
 
The VioGetMode function is a family API function.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
pviomi     Points to the VIOMODEINFO structure that receives the screen-mode
           information.
 
hvio       This parameter 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_INVALID_HANDLE
     ERROR_VIO_INVALID_LENGTH
 
Comments
 
The hvio parameter can be only NULL. This function cannot be used by an
advanced video-input-and-output application.
 
Example
 
This example calls VioGetMode to retrieve the mode information for the
screen.
 
VIOMODEINFO viomi;
viomi.cb = sizeof(viomi);
VioGetMode(&viomi, 0);
if (viomi.fbType == 0)
    VioWrtTTY("Monochrome display\n\r", 20, 0);
 
See Also
 
VioGetState, VioSetMode, VIOMODEINFO