VioGetMode
Bindings: C, MASM
This call returns the mode of the display.
VioGetMode (ModeData, VioHandle)
ModeData (PVIOMODEINFO) - input/output
Far address of a structure where mode characteristics are returned.
length (USHORT)
Input parameter to VioGetMode. Length specifies the length of the
data structure in bytes including Length itself. The value
specified on input controls the amount of mode data returned. The
minimum structure size required is 2 bytes, and the maximum
structure size required is 34 bytes. For OS/2 1.2, a length of 2
returns the size of the maximum structure required for all the mode
data. When length is not equal to 2, the length field is modified
on output to reflect the actual number of bytes returned.
type (UCHAR)
Mode characteristics bit mask:
Bit Description
7-4 Reserved
3 0 = VGA-compatible modes 0 thru 13H
1 = Native mode
2 0 = Enable color burst
1 = Disable color burst
1 0 = Text mode
1 = Graphics mode
0 0 = Monochrome compatible mode
1 = Other.
numcolors (UCHAR)
Number of colors defined as a power of 2. This is equivalent to
the number of color bits that define the color, for example:
Value Definition
0 Monochrome modes 7, 7+, and F.
1 2 colors
2 4 colors
4 16 colors
8 256 colors
textcols (USHORT)
Number of text columns.
textrows (USHORT)
Number of text rows.
pelcols (USHORT)
Horizontal resolution, number of pel columns.
pelrows (USHORT)
Vertical resolution, number of pel rows.
Attribute Format (UCHAR)
Format of the attributes.
Number of Attributes (UCHAR)
Number of attributes in a character cell.
Buffer Address (ULONG)
32-bit physical address of the physical display buffer for this
mode.
Buffer Length (ULONG)
Length of the physical display buffer for this mode.
Full Buffer Size (ULONG)
Size of the buffer required for a full save of the physical display
buffer for this mode.
Partial Buffer Size (ULONG)
Size of the buffer required for a partial (pop-up) save of the
physical display buffer for this mode.
Extended Data Area Address (PCH)
Far address to an extended mode data structure or zero if none. The
format of the extended mode data structure is determined by the
device driver and is unknown to OS/2.
VioHandle (HVIO) - input
Reserved word of 0s.
rc (USHORT) - return
Return code descriptions are:
0 NO_ERROR
436 ERROR_VIO_INVALID_HANDLE
438 ERROR_VIO_INVALID_LENGTH
465 ERROR_VIO_DETACHED
494 ERROR_VIO_EXTENDED_SG
Remarks
Refer to VioSetMode for examples.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs