Graphics Adapter Device Driver Reference/Syntax Conventions

The programming statements in this book use the C language syntax. Support for code written in C is provided in header files identified by the filename extension ".h". Assembler support is provided in the include files identified by the filename extension ".INC".

Parameter Names
Parameter names are constructed to show the data type of the parameter and to indicate its use: Where possible, standard names have been used to describe parameters. Where multiple-word qualifiers are used, the order of the words is not significant.
 * A lowercase prefix of one or more characters that indicates the data type.
 * An optional qualifier starting with an uppercase letter.

For example: hdc         /* device context handle         */ pszFilename /* pointer to a character string */ The following standard base tags and their associated type names are defined: The following standard prefixes are also defined: Some parameters are used in pairs; the qualifiers that are used reflect the relationship between the two variables. For example: The base types and their prefixes are defined as follows: Parameters for defined structures are the defined parameter names. For example: AREADEFS struct {               defSet fFlags CodePage }AREADEFS System-defined constants and flags are represented as two or more uppercase WORDs or mnemonic abbreviations separated by underscores. For example, SYS_CONSTANT and SYS_FLAG.


 * Return Values:Function-handling routines pass full 32-bit return codes back to the calling function. In MASM, the return code is passed in the EAX Register.
 * Register Content Preservation:Registers EAX, ECX, and EDX can be destroyed. All other registers must be preserved.
 * Handles:All handles and pointers are 32-bit values.
 * Coordinates:All coordinates are passed as signed 32-bit values unless stated otherwise. World, model, and presentation-page space coordinates are restricted to the 28 low-order bits and lie within the range F8000000h through 07FFFFFFh. Device space coordinates are restricted to the 16 low-order bits and lie within the range FFFF0000h through 0000FFFFh.