VioGetMode (OS/2 1.x): Difference between revisions
Appearance
Created page with "==Description== This call returns the mode of the display. ==Syntax== <PRE> VioGetMode (ModeData, VioHandle) </PRE> ==Parameters== ; ModeData (PVIOMODEINFO) - input/out..." |
mNo edit summary |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This call returns the mode of the display. | This call returns the mode of the display. | ||
==Syntax== | ==Syntax== | ||
VioGetMode (ModeData, VioHandle) | |||
VioGetMode | |||
==Parameters== | ==Parameters== | ||
; ModeData ( | ;ModeData (P[[VIOMODEINFO]]) - input/output : Far address of a structure where mode characteristics are returned. | ||
;VioHandle (HVIO) - input : Reserved word of 0s. | |||
==Return Code== | ==Return Code== | ||
;rc (USHORT) - return:Return code descriptions are: | |||
*0 NO_ERROR | |||
Return code descriptions are: | *436 ERROR_VIO_INVALID_HANDLE | ||
*438 ERROR_VIO_INVALID_LENGTH | |||
*465 ERROR_VIO_DETACHED | |||
*494 ERROR_VIO_EXTENDED_SG | |||
==Remarks== | ==Remarks== | ||
Refer to VioSetMode for examples. | Refer to [[VioSetMode (FAPI)|VioSetMode]] for examples. | ||
== | ==Bindings== | ||
===C | ===C=== | ||
<PRE> | <PRE> | ||
typedef struct _VIOMODEINFO { | typedef struct _VIOMODEINFO { | ||
USHORT cb; | USHORT cb; /* Length of the entire data structure */ | ||
UCHAR fbType; | UCHAR fbType; /* Bit mask of mode being set */ | ||
UCHAR color; | UCHAR color; /* Number of colors (power of 2) */ | ||
USHORT col; | USHORT col; /* Number of text columns */ | ||
USHORT row; | USHORT row; /* Number of text rows */ | ||
USHORT hres; | USHORT hres; /* Horizontal resolution */ | ||
USHORT vres; | USHORT vres; /* Vertical resolution */ | ||
UCHAR fmt_ID; | UCHAR fmt_ID; /* Attribute format */ | ||
UCHAR attrib; | UCHAR attrib; /* Number of attributes */ | ||
ULONG buf_addr; | ULONG buf_addr; | ||
ULONG buf_length; | ULONG buf_length; | ||
Line 102: | Line 50: | ||
</PRE> | </PRE> | ||
===MASM | ===MASM=== | ||
<PRE> | <PRE> | ||
VIOMODEINFO struc | VIOMODEINFO struc | ||
Line 130: | Line 78: | ||
Returns WORD | Returns WORD | ||
</PRE> | </PRE> | ||
[[Category: | [[Category:Vio]] |
Latest revision as of 02:25, 10 February 2020
This call returns the mode of the display.
Syntax
VioGetMode (ModeData, VioHandle)
Parameters
- ModeData (PVIOMODEINFO) - input/output
- Far address of a structure where mode characteristics are returned.
- VioHandle (HVIO) - input
- Reserved word of 0s.
Return Code
- 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.
Bindings
C
typedef struct _VIOMODEINFO { USHORT cb; /* Length of the entire data structure */ UCHAR fbType; /* Bit mask of mode being set */ UCHAR color; /* Number of colors (power of 2) */ USHORT col; /* Number of text columns */ USHORT row; /* Number of text rows */ USHORT hres; /* Horizontal resolution */ USHORT vres; /* Vertical resolution */ UCHAR fmt_ID; /* Attribute format */ UCHAR attrib; /* Number of attributes */ ULONG buf_addr; ULONG buf_length; ULONG full_length; ULONG partial_length; PCH ext_data_addr; } VIOMODEINFO; typedef VIOMODEINFO far *PVIOMODEINFO; #define INCL_VIO USHORT rc = VioGetMode(ModeData, VioHandle); PVIOMODEINFO ModeData; /* Mode characteristics */ HVIO VioHandle; /* Vio handle */ USHORT rc; /* return code */
MASM
VIOMODEINFO struc viomi_cb dw ? ;Length of the entire data structure viomi_fbType db ? ;Bit mask of mode being set viomi_color db ? ;Number of colors (power of 2) viomi_col dw ? ;Number of text columns viomi_row dw ? ;Number of text rows viomi_hres dw ? ;Horizontal resolution viomi_vres dw ? ;Vertical resolution viomi_fmt_ID db ? ;Attribute format viomi_attrib db ? ;Number of attributes viomi_buf_addr dd ? ; viomi_buf_length dd ? ; viomi_full_length dd ? ; viomi_partial_length dd ? ; viomi_ext_data_addr dd ? ; VIOMODEINFO ends EXTRN VioGetMode:FAR INCL_VIO EQU 1 PUSH@ OTHER ModeData ;Mode characteristics PUSH WORD VioHandle ;Vio handle CALL VioGetMode Returns WORD