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.
VioGetConfig (1.2)
Overview  Changes                                 Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_VIO
 
USHORT VioGetConfig(usConfigId, pvioin, hvio)
USHORT usConfigId;        /* configuration ID                       */
PVIOCONFIGINFO pvioin;    /* pointer to structure for configuration */
HVIO hvio;                /* video handle                           */
 
The VioGetConfig function retrieves the video-display configuration, which
defines the type of display adapter, the type of display, and the amount of
video memory available in the current, primary, or secondary display.
 
The VioGetConfig function is a family API function.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
usConfigId  Specifies the display adapter to retrieve the configuration for.
            This parameter can be one of the following values:
 
            Value                 Meaning
            ────────────────────────────────────────────────────────────────
            VIO_CONFIG_CURRENT    The current display adapter
 
            VIO_CONFIG_PRIMARY    The primary display adapter
 
            VIO_CONFIG_SECONDARY  The secondary display adapter
 
pvioin      Points to the VIOCONFIGINFO structure that receives the display
            configuration for the primary display adapter.
 
hvio        Identifies an advanced video-input-and-output (AVIO)
            presentation space. For AVIO programs, this handle must have
            been created 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_INVALID_LENGTH
     ERROR_VIO_INVALID_PARMS
 
Comments
 
MS OS/2 derives the values for the adapter and display fields of the
VIOCONFIGINFO structure for the display configuration by using various
tests, including checking the switch settings on the card.
 
Example
 
This example calls VioGetConfig to determine whether the primary display
type is an enhanced color display.
 
VIOCONFIGINFO vioinConfig;
vioinConfig.cb = sizeof(vioinConfig);     /* structure length   */
VioGetConfig(VIO_CONFIG_PRIMARY,
    &vioinConfig,                         /* configuration data */
    0);                                   /* video handle       */
if (vioinConfig.display == DISPLAY_EGA)
    VioWrtTTY("Enhanced color display\n\r", 24, 0);
 
See Also
 
VioGetMode, VioGetState, VioCreatePS, VIOCONFIGINFO