Graphics Adapter Device Driver Reference/Data Types

Proceed to the next section for a description of the data types referenced in this book.

ADAPTERINFO
The ADAPTERINFO data structure receives information for the current video adapter. typedef struct _ADAPTERINFO { ULONG     cb;                          /* Length of the structure. */ ULONG      ulAdapterID;                 /* Specifies the adapter by ID. */ CHAR       szOEMString[MAX_OEM_STRING]; /* Contains adapter information. */ CHAR       szDACString[MAX_DAC_STRING]; /* Contains DAC information. */ CHAR       szRevision[MAX_VERSION];     /* Contains version information. */ ULONG      ulTotalMemory;               /* Total video memory. */ ULONG      ulMMIOBaseAddress;           /* Base address for memory-mapped I/O registers. */ ULONG      ulPIOBaseAddress;            /* Base address for I/O ports. */ BYTE       bBusType;                    /* Type of bus (PCI, VLB, and so on.) */ BYTE      bEndian;                     /* Big Endian or little Endian. */ USHORT     usDeviceBusID;               /* Reserved. */ USHORT     usVendorBusID;               /* Reserved. */ USHORT     usSlotID;                    /* Reserved. */ } ADAPTERINFO;

typedef  ADAPTERINFO   * FAR   * PADAPTERINFO ;
 * Fields
 * cb(ULONG) Length of the structure.
 * ulAdapterID(ULONG) Specifies the adapter by ID.
 * szOEMString[MAX_OEM_STRING](CHAR) Contains adapter information.
 * Valid value is as follows: MAX_OEM_STRING 128
 * szDACString[MAX_DAC_STRING](CHAR) Contains DAC information.
 * Valid value is as follows: MAX_DAC_STRING 128
 * szRevision[MAX_VERSION](CHAR) Contains version information.
 * Valid value is as follows: MAX_VERSION 128
 * ulTotalMemory(ULONG) Total video memory.
 * ulMMIOBaseAddress(ULONG) Base address for memory-mapped I/O registers.
 * ulPIOBaseAddress(ULONG) Base address for I/O ports.
 * bBusType(BYTE) Type of bus (PCI, VLB, and so on.)
 * The valid values for this flag are as follows:
 * ISA_BUS 0
 * VLB_BUS 1
 * PCI_BUS 2
 * EISA_BUS 3
 * PCMCIA_BUS 4
 * MCA_BUS 5
 * bEndian(BYTE) Big Endian or little Endian.
 * LITTLE_ENDIAN 0
 * BIG_ENDIAN 1
 * usDeviceBusID(USHORT) Reserved.
 * usVendorBusID(USHORT) Reserved.
 * usSlotID(USHORT) Reserved.

APIRET
Unsigned integer in the range 0 through 4 294 967 295. typedef unsigned long APIRET;

BANKDATA
The BANKDATA data structure contains the current mode ID and the bank number. typedef struct _BANKDATA { MODEID    miBank;  /*  ID of the current mode. */ ULONG      ulBank;  /*  Current bank number. */ } BANKDATA;

typedef  BANKDATA *FAR *PBANKDATA;
 * Fields
 * miBank(MODEID) ID of the current mode.
 * ulBank(ULONG) Current bank number.

BITBLTINFO
BitBlt information structure. BitBlt information structure, used for the and  functions. typedef struct _BITBLTINFO { ULONG        ulLength;       /*  Length of the BITBLTINFO data structure, in bytes. */ ULONG         ulBltFlags;     /*  Flags for rendering of rasterized data. */ ULONG         cBlits;         /*  Count of Blts to be performed. */ ULONG         ulROP;          /*  Raster operation. */ ULONG         ulMonoBackROP;  /*  Background mix if B_APPLY_BACK_ROP is set. */ ULONG         ulSrcFGColor;   /*  Monochrome source Foreground color. */ ULONG         ulSrcBGColor;   /*  Monochrome source Background color and transparent color. */ ULONG         ulPatFGColor;   /*  Monochrome pattern Foreground color. */ ULONG         ulPatBGColor;   /*  Monochrome pattern Background color. */ PBYTE         abColors;       /*  Pointer to color translation table. */ PBMAPINFO     pSrcBmapInfo;   /*  Pointer to source bit map (BMAPINFO) */ PBMAPINFO    pDstBmapInfo;   /*  Pointer to destination bit map (BMAPINFO). */ PBMAPINFO     pPatBmapInfo;   /*  Pointer to pattern bit map (BMAPINFO). */ PPOINTL       aptlSrcOrg;     /*  Pointer to array of source origin POINTLs. */ PPOINTL       aptlPatOrg;     /*  Pointer to array of pattern origin POINTLs. */ PBLTRECT      abrDst;         /*  Pointer to array of Blt rects. */ PRECTL        prclSrcBounds;  /*  Pointer to source bounding rect of source Blts. */ PRECTL        prclDstBounds;  /*  Pointer to destination bounding rect of destination Blts. */ } BITBLTINFO;

typedef  BITBLTINFO   * PBITBLTINFO ;
 * Fields
 * ulLength(ULONG) Length of the BITBLTINFO data structure, in bytes.
 * ulBltFlags(ULONG) Flags for rendering of rasterized data.
 * Miscellaneous flags used by the graphics engine for rendering of rasterized data:
 * BF_DEFAULT_STATE Blt direction is left to right and top to bottom.
 * BF_DIR_X_NEGATIVE Blt direction is towards X origin.
 * BF_DIR_Y_NEGATIVE Blt direction is towards Y origin.
 * BF_ROP_INCL_SRC ROP includes a source bit map.
 * BF_ROP_INCL_PAT ROP includes a pattern bit map.
 * BF_SRC_TRANSPARENT Source transparent involved. SRC will not change when SRC=BG_COLOR.
 * BF_DST_TRANSPARENT Destination transparent involved. DST will not change when DST=BG_COLOR.
 * BF_PAT_TRANSPARENT Pattern transparent involved. Pattern not involved when PAT=BG_COLOR.
 * BF_PAT_SOLID Pattern is solid; all Foreground color.
 * BF_PAT_HOLLOW Pattern is hollow (empty); no Foreground color.
 * BF_APPLY_BACK_ROP Treat ROP as Foreground mix and MonoBackROP as Background mix.
 * BF_SRC_MONOINVERT Zero (0) bits are Foreground on monochrome SRC bit map.
 * BF_PAT_MONOINVERT Zero (0) bits are Foreground on monochrome PAT bit map.
 * BF_SR_BITS_EXTERNAL Source bit map bits are in a nondevice-specific format.
 * BF_LAST_BLT Defines last blit in a banded BitBlit.
 * BF_SRC_Y_FLIP Source Y coordinates are inverted relative to device origin.
 * cBlits(ULONG) Count of Blts to be performed.
 * ulROP(ULONG) Raster operation.
 * ulMonoBackROP(ULONG) Background mix if B_APPLY_BACK_ROP is set.
 * ulSrcFGColor(ULONG) Monochrome source Foreground color.
 * ulSrcBGColor(ULONG) Monochrome source Background color and transparent color.
 * ulPatFGColor(ULONG) Monochrome pattern Foreground color.
 * ulPatBGColor(ULONG) Monochrome pattern Background color.
 * abColors(PBYTE) Pointer to color translation table.
 * pSrcBmapInfo(PBMAPINFO) Pointer to source bit map
 * pDstBmapInfo Pointer to destination bit map (BMAPINFO).
 * pPatBmapInfo(PBMAPINFO) Pointer to pattern bit map (BMAPINFO).
 * aptlSrcOrg(PPOINTL) Pointer to array of source origin s.
 * aptlPatOrg(PPOINTL) Pointer to array of pattern origin POINTLs.
 * abrDst Pointer to array of Blt rects.
 * prclSrcBounds(PRECTL) Pointer to source bounding rect of source Blts.
 * prclDstBounds(PRECTL) Pointer to destination bounding rect of destination Blts.

BLTRECT
Destination rectangle for a bitblt operation. typedef struct _BLTRECT { ULONG    ulXOrg;  /*  X origin of the destination Blt. */ ULONG     ulYOrg;  /*  Y origin of the destination Blt. */ ULONG     ulXExt;  /*  X extent of the BitBlt. */ ULONG     ulYExt;  /*  Y extent of the BitBlt. */ } BLTRECT;

typedef  BLTRECT   * PBLTRECT ;
 * Fields
 * ulXOrg(ULONG) X origin of the destination Blt.
 * ulYOrg(ULONG) Y origin of the destination Blt.
 * ulXExt(ULONG) X extent of the BitBlt.
 * ulYExt(ULONG) Y extent of the BitBlt.

BMAPINFO
Device-dependent bit map information structure. typedef struct _BMAPINFO { ULONG    ulLength;        /*  Length of the BMAPINFO data structure, in bytes. */ ULONG     ulType;          /*  Description of the Blt. */ ULONG     ulWidth;         /*  Width in pels of the bit map. */ ULONG     ulHeight;        /*  Height in pels of the bit map. */ ULONG     ulBpp;           /*  Number of bits per pel/color depth. */ ULONG     ulBytesPerLine;  /*  Number of aligned bytes per line. */ PBYTE     pBits;           /*  Pointer to bit-map bits. */ } BMAPINFO;

typedef  BMAPINFO   * PBMAPINFO ;


 * Fields
 * ulLength(ULONG) Length of the BMAPINFO data structure, in bytes.
 * ulType(ULONG) Description of the Blt.
 * BMAP_VRAM Bit map is in video memory.
 * BMAP_MEMORY Bit map is in system memory.
 * BMAP_VERTICAL_SCAN Scan lines are in a vertical format instead of the default horizontal format.
 * BMAP_FONT BitBlit is a set of font character glyphs.
 * ulWidth(ULONG) Width in pels of the bit map.
 * ulHeight(ULONG) Height in pels of the bit map.
 * ulBpp(ULONG) Number of bits per pel/color depth.
 * ulBytesPerLine(ULONG) Number of aligned bytes per line.
 * pBits(PBYTE) Pointer to bit-map bits.

The scanlines of the bit map can be either byte-aligned or word-aligned.

BUFFER
Data structure inside containing the input/output buffers for the bios call. typedef struct _BUFFER { BYTE     bBufferType;  /*  Input buffer. */ BYTE      bReserved;    /*  Reserved */ BYTE     bSelCRF;      /*  CRF flag for the selector. */ BYTE      bOffCRF;      /*  CRF flag for the offset. */ VOID      pAddress;     /*  Linear address of the buffer. */ ULONG     ulSize; } BUFFER;

typedef  BUFFER   * PBUFFER ;
 * Fields
 * bBufferType(BYTE) Input buffer.
 * BUFFER_NONE 0
 * INPUT_BUFFER 1
 * OUTPUT_BUFFER 2
 * bReserved(BYTE) Reserved
 * bSelCRF(BYTE) CRF flag for the selector.
 * UlONG index into the CRF.
 * bOffCRF(BYTE) CRF flag for the offset.
 * ULONG index into the CRF.
 * pAddressLinear address of the buffer.
 * ulSize(ULONG)

CAPSINFO
GRADD capability information. typedef struct _CAPSINFO { ULONG     ulLength;            /*  Size of the CAPSINFO data structure, in bytes. */ PSZ       pszFunctionClassID;  /*  Name describing function set. */ ULONG     ulFCFlags;           /*  Function class specific flags. */ } CAPSINFO;

typedef  CAPSINFO   * PCAPSINFO ;
 * Fields
 * ulLength(ULONG) Size of the CAPSINFO data structure, in bytes.
 * pszFunctionClassID(PSZ) Name describing the function set.
 * A GRADD supporting the base function set should return pszFunctionClassID pointing to the string "Base Function."

The following definition is provided:


 * 1) define BASE_FUNCTION_CLASS "Base Function"
 * ULONG(PVOID) Function class specific flags.
 * For the base function class, the following flags are defined:


 * 1) define GC_SEND_MEM_TO_MEM 0x00000001 /* Invoke GRADD for bitblts and lines even when hardware display memory is not used. Normally such cases are not sent to a GRADD since the hardware is unlikely to provide acceleration for system memory bitmaps. */
 * 2) define TEXTBLT_DOWNLOADABLE 0x00002000 /* Downloadable fonts supported. */
 * 3) define TEXTBLT_CLIPABLE 0x00004000 /* Clipable fonts. */
 * 4) define TEXTBLT_DS_DEVICE_FONTS 0x00008000 /* Device supports hardware fonts. */
 * 5) define DS_SIMPLE_LINES 0x00800000 /* GRADD handles LINEINFO2. */

CHAININFO
Information returned to callers of the function. typedef struct _CHAININFO { CID           cid;             /*  GRADD chain ID. */ PSZ            pszChainName;    /*  GRADD chain name. */ PFNHWENTRY     pChainHWEntry;   /*  Entry point for this chain. */ PGRADDINFO     pGraddList;      /*  List of GRADDs in this chain. */ CHAININFO      pNextChainInfo;  /*  Pointer to next GRADD in this chain. */ } CHAININFO;

typedef  CHAININFO   * PCHAININFO ;


 * Field
 * cid(CID) GRADD chain ID.
 * pszChainName(PSZ) GRADD chain name.
 * pChainHWEntry(PFNHWENTRY) Entry point for this chain.
 * pGraddList List of GRADDs in this chain.
 * pNextChainInfo(CHAININFO) Pointer to next GRADD in this chain.

CLUTDATA
The CLUTDATA data structure receives information for the number of array entries. typedef struct _CLUTDATA { ULONG      ulRGBCount;  /*  Number of aRGB entries that follow. */ ULONG       ulRGBStart;  /*  Start index for RGB triplets. */ SVGARGB     aRGB[1];     /*  Start of SVGARGB; one entry is allocated. */ } CLUTDATA;

typedef  CLUTDATA   * FAR   * PCLUTDATA ;
 * Fields
 * ulRGBCount(ULONG) Number of aRGB entries that follow.
 * ulRGBStart(ULONG) Start index for triplets.
 * aRGB[1](SVGARGB) Start of ; one entry is allocated.

CODECINFO
Determines whether data is to be compressed or decompressed. typedef struct _CODECINFO { ULONG     ulLength;      /* Size of the CODECINFO data structure, in bytes. */ FOURCC     fccCodecType;  /* Describes compression type; 'RAW' if uncompressed. */ ULONG      ulCodecCaps;   /* Flag indicating CODEC capabilities. */ } CODECINFO;
 * C Declaration Method
 * typedef CODECINFO *PCODECINFO;


 * Fields
 * ulLength(ULONG) Size of the CODECINFO data structure, in bytes.
 * fccCodecType(FOURCC) Describes compression type; 'RAW' if uncompressed.
 * The FOURCC flags have the following values:
 * CODEC_ULTIMOTION "ULTI"
 * CODEC_INDEO21 "RT21"
 * CODEC_INDEO31 "IV31"
 * CODEC_MPEG1 "MPG1"
 * CODEC_MPEG2 "MPG2"
 * CODEC_MJPEG "MJPG"
 * ulCodecCaps(ULONG) Flag indicating CODEC capabilities.
 * The following values are valid:
 * CODEC_ACCEL_STRETCHBLT 0x0002; hardware stretch
 * CODEC_ACCEL_BLTCOPROC 0x0002; hardware Blt
 * CODEC_ACCEL_DECOMP 0x0004; has hardware decompression
 * CODEC_ACCEL_COMP 0x0008; has hardware compression

COLORINFO
Color formats for source and destination data, organized in order of preference from the driver's perspective. This data structure is required in any driver supporting EnDIVE. typedef struct _COLORINFO { ULONG     ulLength;          /*  Size of the COLORINFO data structure, in bytes. */ FOURCC     fccColorEncoding;  /*  Field containing a name for the color space. */ } COLORINFO;

typedef  COLORINFO   * PCOLORINFO ;
 * Fields
 * ulLength(ULONG) Size of the COLORINFO data structure, in bytes.
 * fccColorEncoding(FOURCC) Field containing a name for the color space.
 * The FOURCC represents a name (for example, RGB8, Y24, and so on). The bits per pixel and data layout of the color space is implied by the name.
 * This field can have the following values:
 * FOURCC(ch0,ch1,ch2,ch3)

((ULONG)(BYTE)(ch0) | ((ULONG)(BYTE)(ch1) <<8) | \    ((ULONG)(BYTE)(CH2)<<16) | ((ULONG)(BYTE)(CH3)<<24))
 * FOURCC_LUT8 FOURCC('L','U','T','8') 8-bit palettized color space
 * FOURCC_R565 FOURCC('R','5','6','5') RGB 565
 * FOURCC_R555 FOURCC('R','5','5','5') RGB 555
 * FOURCC_R666 FOURCC('R','6','6','6') RGB 666
 * FOURCC_R664 FOURCC('R','6','6','4') RGB 664
 * FOURCC_RGB3 FOURCC('R','G','B','3') RGB 24 in 3 bytes
 * FOURCC_BGR3 FOURCC('B','G','R','3') BGR 24 in 3 bytes
 * FOURCC_RGB4 FOURCC('R','G','B','4') RGB 24 in 4 bytes
 * FOURCC_BGR4 FOURCC('B','G','R','4') BGR 24 in 4 bytes
 * FOURCC_Y888 FOURCC('Y','8','8','8') YUV 24
 * FOURCC_Y411 FOURCC('Y','4','1','1') YUV 411 interleaved 4 x 1 subsampled
 * FOURCC_Y422 FOURCC('Y','4','2','2') YUV 422 (CCIR601)
 * FOURCC_YUV9 FOURCC('Y','U','V','9') YUV9
 * FOURCC_Y2X2 FOURCC('Y','2','X','2') YUV 2 by 2 subsampled multiplane
 * FOURCC_Y4X4 FOURCC('Y','4','X','4') YUV 4 by 4 subsampled multiplane

CUSTPALINFO
Custom palette information. typedef struct _CUSTPALINFO { ULONG    ulLength;      /* Size of the CUSTPALINFO data structure, in bytes. */ ULONG     fFlags;        /* Palette flag. */ ULONG     ulStartIndex;  /* Starting palette index. */ ULONG     ulNumEntries;  /* Number of palette slots to query or set. */ PRGB2     pRGBs;         /* Pointer to the array of RGB values. */ } CUSTPALINFO;

typedef  CUSTPALINFO   * PCUSTPALINFO ;
 * Fields
 * ulLength(ULONG) Size of the CUSTPALINFO data structure, in bytes.
 * fFlags(ULONG) Palette flag.
 * Not used at this time.
 * ulStartIndex(ULONG) Starting palette index.
 * ulNumEntries(ULONG) Number of palette slots to query or set.
 * pRGBs Pointer to the array of RGB values.

DRIVERCAPS
Information structure used for, , , and functions. typedef struct _DRIVERCAPS { ULONG    ulCb;                    /*  Length of the source structure in bytes. */ CHAR      szCapsDesc[256];         /*  Capability description. */ CHAR      szHelpFileName[256];     /*  Help file name. */ ULONG     ulHelpId;                /*  Help resource id. */ ULONG     ulCapsType;              /*  Defines the returned data type. */ ULONG     ulValueMemberSize;       /*  Size of each member. */ ULONG     ulNumValueMember;        /*  Number of members if aggregate. */ PVOID     pValueList;              /*  Pointer to storage for the members data. */ PVOID     pCurrentValue;           /*  Pointer to the current selected value descriptions. */ PVOID     pDefaultValue;           /*  Pointer to the default (reset) value information. */ BOOL      bDefaultValueSupported;  /*  Return TRUE if driver supports default. */ BOOL      bStaticCaps;             /*  Return TRUE if need to reboot for the new capability. */ } DRIVERCAPS;

typedef  DRIVERCAPS   * PDRIVERCAPS ;


 * Fields
 * ulCb(ULONG) Length of the source structure in bytes.
 * szCapsDesc[256](CHAR) Capability description.
 * szHelpFileName[256](CHAR) Help file name.
 * ulHelpId(ULONG) Help resource id.
 * ulCapsType(ULONG) Defines the returned data type.
 * This field defines the datatype returned in pValueList, pCurrentValue, and pDefaultValue.
 * There are three data types currently supported, specified by the ulCapsType field: boolean, aggregate of int values, and aggregate of strings. These data types can be defined as follows:
 * #define CAPSTYPE_BOOLEAN 1L
 * 1) define CAPSTYPE_AGGREGATE_INT 2L
 * 2) define CAPSTYPE_AGGREGATE_STRING 3L
 * Note:When ulCapsType is CAPSTYPE_BOOLEAN, the driver does not have to fill in pValueList.
 * ulValueMemberSize(ULONG) Size of each member.
 * ulNumValueMember(ULONG) Number of members if aggregate.
 * pValueList(PVOID) Pointer to storage for the members data.
 * pCurrentValue(PVOID) Pointer to the current selected value descriptions.
 * pDefaultValue(PVOID) Pointer to the default (reset) value information.
 * bDefaultValueSupported(BOOL) Return TRUE if driver supports default.
 * bStaticCaps(BOOL) Return TRUE if need to reboot for the new capability.

DEVFONTINFO
Information structure used for and  functions. The structure includes a pointer to DEVFONTINFO. typedef struct _DEVFONTINFO { ULONG      ulFntCnt;         /*  Maximum glyphs contained in this font. */ ULONG       fFontInfo;        /*  Flags used to define DBCS or fixed font. */ ULONG       ulEngTag;         /*  Renderer tag. */ ULONG       ulUniqueFntID;    /*  Unique font identifier. */ ULONG       ulMaxHeight;      /*  Maximum glyph height. */ ULONG       ulMaxWidth;       /*  Maximum glyph width. */ PGHBTBL     pghbTbl;          /*  Pointer to high byte table. */ ULONG       ulHalfWidth;      /*  Reserved. */ CHAR        szGlyphlist[16];  /*  Reserved */ ULONG      ulReserved1;      /*  Reserved. */ ULONG       ulReserved2;      /*  Reserved. */ } DEVFONTINFO;

typedef  DEVFONTINFO   * PDEVFONTINFO ;
 * Fields
 * ulFntCnt(ULONG) Maximum glyphs contained in this font.
 * fFontInfo(ULONG) Flags used to define DBCS or fixed font.

DFI_FIXED_FONT A predefined number, such as the following: DFI_DBCS_FONT A predefined number, such as the following:
 * 1) define DFI_FIXED_FONT   0x00000001
 * 1) define DFI_DBCS_FONT   0x00000002


 * ulEngTag(ULONG) Renderer tag.

GRETAG A predefined string, such as the following: WINTAG A predefined string, such as the following:
 * 1) define GRETAG ('G'+('R'<<8)+('E'<<16)+('_'<<24)) //"GRE_"
 * 1) define WINTAG ('W'+('I'<<8)+('N'&<<16)+('_'<<24)) //"WIN_"


 * ulUniqueFntID(ULONG) Unique font identifier.
 * ulMaxHeight(ULONG) Maximum glyph height.
 * ulMaxWidth(ULONG) Maximum glyph width.
 * pghbTbl Pointer to high byte table.
 * ulHalfWidth(ULONG) Reserved.
 * szGlyphlist[16](CHAR) Reserved
 * ulReserved1(ULONG) Reserved.
 * ulReserved2(ULONG) Reserved.

FBINFO
Information on frame buffer characteristics. typedef struct _FBINFO { ULONG    ulLength;          /*  Length of FBINFO data structure, in bytes. */ ULONG     ulFlags;           /*  Specifies the capabilities supported. */ ULONG     ulBPP;             /*  Screen bits per pel. */ ULONG     ulXres;            /*  Number of screen X pels. */ ULONG     ulYres;            /*  Number of screen Y pels. */ ULONG     ulScanLineBytes;   /*  Number of bytes per scanline. */ ULONG     fccColorEncoding;  /*  Screen color encoding. */ ULONG     ulENDIVEDrivers;   /*  Number of EnDIVE drivers installed under GRADD architecture. */ } FBINFO;
 * C Declaration Method
 * typedef FBINFO *PFBINFO;


 * Fields
 * ulLength(ULONG) Length of FBINFO data structure, in bytes.
 * ulFlags(ULONG) Specifies the capabilities supported.
 * This flag has the following value:
 * FB_SUPPORTSVRAMALLOC 0x0010; supports allocation of on-card memory
 * ulBPP(ULONG) Screen bits per pel.
 * This value may be 32 for some 24-bit color adapters.
 * ulXres(ULONG) Number of screen X pels.
 * ulYres(ULONG) Number of screen Y pels.
 * ulScanLineBytes(ULONG) Number of bytes per scanline.
 * fccColorEncoding(ULONG) Screen color encoding.
 * ulENDIVEDrivers(ULONG) Number of EnDIVE drivers installed under GRADD architecture.

FONTDATA
The FONTDATA data structure contains font and character information. typedef struct _FONTDATA { ULONG    ulCharCount;   /*  Number of characters in the font. */ ULONG     ulFontHeight;  /*  Number of scan lines per character. */ ULONG     ulFontWidth;   /*  Number of columns per character. */ BYTE      bFontData[1];  /*  ulCharCount*ulFontHeight entries. */ } FONTDATA;

typedef  FONTDATA   * FAR   * PFONTDATA ;
 * Fields:ulCharCount(ULONG) Number of characters in the font.
 * ulFontHeight(ULONG) Number of scan lines per character.
 * ulFontWidth(ULONG) Number of columns per character.
 * bFontData[1](BYTE) ulCharCount*ulFontHeight entries.

GDDINITIN
Information provided to the GRADD in the GHI_CMD_INIT function. typedef struct _GDDINITIN { ULONG         ulLength;           /*  Length of the GDDINITIN data structure, in bytes. */ PFNHWENTRY     pfnChainedHWEntry;  /*  Entry of previous GRADD in chain. */ } GDDINITIN;

typedef  GDDINITIN   * PGDDINITIN ;


 * Fields
 * ulLength(ULONG) Length of the GDDINITIN data structure, in bytes.
 * pfnChainedHWEntry(PFNHWENTRY) Entry of previous GRADD in chain.

GDDINITOUT
Information returned by the GRADD to the caller of the GHI_CMD_INIT function. typedef struct _GDDINITOUT { ULONG    ulLength;          /*  Length of the GDDINITOUT data structure, in bytes. */ ULONG     cFunctionClasses;  /*  Number of function classes supported. */ } GDDINITOUT;

typedef  GDDINITOUT   * PGDDINITOUT ;


 * Fields
 * ulLength(ULONG) Length of the GDDINITOUT data structure, in bytes.
 * cFunctionClasses(ULONG) Number of function classes supported.

In most cases, this value will be equal to one (1). A GRADD can, however, return a zero (0). This is typically done by filter GRADDs that do not want to be entered in the CHAININFO/GRADDINFO information returned to the translation layer via the VMI_CMD_QUERYCHAININFO function. A GRADD can include built-in extensions by returning a value greater than one (1).

GDDMODEINFO
Mode-specific information provided by the GRADD. typedef struct _GDDMODEINFO { ULONG    ulLength;           /*  Size of the GDDMODEINFO data structure, in bytes. */ ULONG     ulModeId;           /*  ID used to make SETMODE request. */ ULONG     ulBpp;              /*  Number of colors (bpp). */ ULONG     ulHorizResolution;  /*  Number of horizontal pels. */ ULONG     ulVertResolution;   /*  Number of vertical scan lines. */ ULONG     ulRefreshRate;      /*  Refresh rate in Hz. */ PBYTE    pbVRAMPhys;         /*  Physical address of VRAM. */ ULONG     ulApertureSize;     /*  Size of VRAM, in bytes. */ ULONG     ulScanLineSize;     /*  Size of one scan line, in bytes. */ } GDDMODEINFO;

typedef  GDDMODEINFO   * PGDDMODEINFO ;


 * Fields
 * ulLength(ULONG) Size of the GDDMODEINFO data structure, in bytes.
 * ulModeId(ULONG) ID used to make SETMODE request.
 * ulBpp(ULONG) Number of colors (bpp).
 * ulHorizResolution(ULONG) Number of horizontal pels.
 * ulVertResolution(ULONG) Number of vertical scan lines.
 * ulRefreshRate(ULONG) Refresh rate in Hz.
 * This value is zero (0) if Hz not available.
 * pbVRAMPhys(PBYTE) Physical address of VRAM.
 * ulApertureSize(ULONG) Size of VRAM, in bytes.
 * ulScanLineSize(ULONG) Size of one scan line, in bytes.

GHBTBL
Glyph high byte table. typedef struct _GHBTBL { PGLBTBL    pglbTbl[1];  /*  Up to 256 entries per table */ } GHBTBL;

typedef  GHBTBL   * PGHBTBL ;


 * Fields
 * pglbTbl[1] Up to 256 entries per table

GLBTBL
Glyph low byte table. typedef struct _GLBTBL { PGLYPHINFO    pGlyphInfo[1];  /*  Up to 256 entries per table */ } GLBTBL;

typedef  GLBTBL   * PGLBTBL ;


 * Field
 * pGlyphInfo[1] Up to 256 entries per table

GRADDINFO
Information describing an individual GRADD. typedef struct _GRADDINFO { GID            gid;             /*  ID of the GRADD. */ PSZ             pszGraddName;    /*  Name of this GRADD. */ PFNHWENTRY      pGraddEntry;     /*  Pointer to HWENTRY for this GRADD. */ PFNHWENTRY      pChainEntry;     /*  Pointer to HWENTRY for this GRADD chain. */ ULONG           cModes;          /*  Count of available graphics modes. */ GDDMODEINFO     pModeInfo;       /*  Pointer to GDDMODEINFO data structure. */ CAPSINFO        pCapsInfo;       /*  Pointer to CAPSINFO data structure. */ GRADDINFO       pNextGraddInfo;  /*  Pointer to next GRADDINFO data structure. */ } GRADDINFO;

typedef  GRADDINFO   * PGRADDINFO ;


 * Fields
 * gid(GID) ID of the GRADD.
 * pszGraddName(PSZ) Name of this GRADD.
 * pGraddEntry(PFNHWENTRY) Pointer to HWENTRY for this GRADD.
 * pChainEntry(PFNHWENTRY) Pointer to HWENTRY for this GRADD chain.
 * cModes(ULONG) Count of available graphics modes.
 * This is the count of the available graphics modes supported by this GRADD.
 * pModeInfo Pointer to GDDMODEINFO data structure.
 * pCapsInfo Pointer to CAPSINFO data structure.
 * pNextGraddInfo(GRADDINFO) Pointer to next GRADDINFO data structure.

This points to the next data structure in this GRADD chain.

GLYPHINFO
Information structure referenced by the pointer to glyph indices (pGlyphIndicies) in the structure. typedef struct _GLYPHINFO { CHAR        bAspace;   /*  Reserved */ CHAR        bBspace;   /*  Reserved */ CHAR        bCspace;   /*  Reserved */ CHAR        bPad;      /*  Reserved */ BMAPINFO    bmapinfo;  /*  Destination physical surface descriptions */ } GLYPHINFO;

typedef  GLYPHINFO   * PGLYPHINFO;


 * Fields
 * bAspace(CHAR) Reserved
 * bBspace(CHAR) Reserved
 * bCspace(CHAR) Reserved
 * bPad(CHAR) Reserved
 * bmapinfo Destination physical surface descriptions

HWBANKIN
Information structure used for and  functions. typedef struct _HWBANKIN { ULONG    ulLength;  /*  Length of the HWBANKIN data structure, in bytes. */ ULONG     ulFlags;   /*  Defines for ulFlags. */ ULONG     ulBank;    /*  Bank number. */ } HWBANKIN;

typedef  HWBANKIN   * PHWBANKIN ;


 * Fields
 * ulLength(ULONG) Length of the HWBANKIN data structure, in bytes.
 * ulFlags(ULONG) Defines for ulFlags.
 * BANK_SET 1
 * BANK_GET 2
 * ulBank(ULONG) Bank number.

HWBANKOUT
Information structure used for and  functions.

typedef struct _HWBANKOUT { ULONG    ulLength;  /*  Length of the HWBANKOUT data structure, in bytes. */ ULONG     ulBank;    /*  Bank number. */ } HWBANKOUT;

typedef  HWBANKOUT   * PHWBANKOUT ;


 * Fields
 * ulLength(ULONG) Length of the HWBANKOUT data structure, in bytes.
 * ulBank(ULONG) Bank number.

HWEVENTIN
Input data to the function. typedef struct _HWEVENTIN { ULONG    ulLength;    /*  Size of the HWEVENTIN data structure, in bytes. */ ULONG     ulEvent;     /*  Flag indicating type of event. */ ULONG     pEventData;  /*  Pointer to event-specific data. */ } HWEVENTIN;

typedef  HWEVENTIN   * PHWEVENTIN ;

EVENT_FOREGROUND EVENT_NEWCHAININFO
 * Fields
 * ulLength(ULONG) Size of the HWEVENTIN data structure, in bytes.
 * ulEvent(ULONG) Flag indicating type of event.
 * Valid values are:
 * EVENT_BACKGROUND
 * pEventData(ULONG) Pointer to event-specific data.

HWEXTENSION
Input data to the function. typedef struct _HWEXTENSION { ULONG     ulLength;         /*  Size of the HWEXTENSION data structure, in bytes. */ ULONG      ulXSubFunction;   /*  Subfunction code. */ ULONG      cScrChangeRects;  /*  Count of screen rectangles affected by HWEXTENSION. */ PRECTL     arectlScreen;     /*  Array of screen rectangles affected by HWEXTENSION. */ ULONG      ulXFlags;         /*  Flag indicating hardware serialization. */ PVOID      pXP1;             /*  Extension-specific input packet. */ } HWEXTENSION;

typedef  HWEXTENSION   * PHWEXTENSION ;


 * Fields
 * ulLength(ULONG) Size of the HWEXTENSION data structure, in bytes.
 * ulXSubFunction(ULONG) Subfunction code.
 * cScrChangeRects(ULONG) Count of screen rectangles affected by HWEXTENSION.
 * arectlScreen Array of screen rectangles affected by HWEXTENSION.
 * ulXFlags(ULONG) Flag indicating hardware serialization.
 * Value for this flag is as follows: X_REQUESTHW 1
 * pXP1(PVOID) Extension-specific input packet.

HWMOVEPTRIN
Input packet provided to the GRADD in the GHI_CMD_MOVEPTR function. typedef struct _HWMOVEPTRIN { ULONG     ulLength;  /*  Size of the HWMOVEPTRIN data structure, in bytes. */ POINTL     ptlPos;    /*  Pointer to video screen coordinate of pointer hot spot. */ } HWMOVEPTRIN;

typedef  HWMOVEPTRIN   * PHWMOVEPTRIN ;


 * Fields
 * ulLength(ULONG) Size of the HWMOVEPTRIN data structure, in bytes.
 * ptlPos Pointer to video screen coordinate of pointer hot spot.
 * Video screen coordinates are expected in the ptlPosfield.

HWPALETTEINFO
Input packet provided to the GRADD in the function. typedef struct _HWPALETTEINFO { ULONG    ulLength;      /*  Size of the HWPALETTEINFO data structure, in bytes. */ ULONG     fFlags;        /*  Palette flag. */ ULONG     ulStartIndex;  /*  Starting palette index. */ ULONG     ulNumEntries;  /*  Number of palette slots to query or set. */ PRGB2     pRGBs;         /*  Pointer to the array of RGB values. */ } HWPALETTEINFO;

typedef  HWPALETTEINFO   * PHWPALETTEINFO ;

PALETTE_SET 0x0002
 * Fields
 * ulLength(ULONG) Size of the HWPALETTEINFO data structure, in bytes.
 * fFlags(ULONG) Palette flag.
 * These flags have the following values:
 * PALETTE_GET 0x0001
 * ulStartIndex(ULONG) Starting palette index.
 * ulNumEntries(ULONG) Number of palette slots to query or set.
 * pRGBs Pointer to the array of values.

HWREQIN
Input packet to the function.

typedef struct _HWREQIN { ULONG     ulLength;         /*  Size of the HWREQIN data structure, in bytes. */ ULONG      ulFlags;          /*  Request option flags. */ ULONG      cScrChangeRects;  /*  Count of screen rectangles affected by HWREQIN. */ PRECTL     arectlScreen;     /*  Array of screen rectangles affected by HWREQIN. */ } HWREQIN;

typedef  HWREQIN   * PHWREQIN ;


 * Fields
 * ulLength(ULONG) Size of the HWREQIN data structure, in bytes.
 * ulFlags(ULONG) Request option flags.
 * Request option flags can be defined as follows:
 * define REQUEST_HW 0x01
 * 1) define REQUEST_SEM_ONLY 0x02
 * If the REQUEST_HW flag is set, the VMAN hardware serialization lock is obtained, and pointer exclusion is performed.
 * If the REQUEST_HW flag is set and the REQUEST_SEM_ONLY flag is not set, VMAN invokes the GRADD for GHI_CMD_REQUESTHW to request the linear aperture to the frame buffer.
 * If the REQUEST_HW flag is set and the REQUEST_SEM_ONLY flag is set, VMAN does not invoke the GRADD for GHI_CMD_REQUESTHW.
 * If the REQUEST_HW flag is not set, the VMAN hardware serialization lock is released, and pointer exclusion is ended.
 * If the REQUEST_HW flag is not set and the REQUEST_SEM_ONLY flag is not set, VMAN invokes the GRADD for GHI_CMD_REQUESTHW to release the linear aperture to the frame buffer.
 * If the REQUEST_HW flag is not set and the REQUEST_SEM_ONLY flag is set, VMAN does not invoke the GRADD for GHI_CMD_REQUESTHW.
 * cScrChangeRects(ULONG) Count of screen rectangles affected by HWREQIN.
 * arectlScreen Array of screen rectangles affected by HWREQIN.

HWSETPTRIN
Input packet to the GHI_CMD_SETPTR function. typedef struct _HWSETPTRIN { ULONG     ulLength;    /*  Size of the HWSETPTRIN data structure, in bytes. */ PBYTE      pbANDMask;   /*  Pointer to AND bit-mask pointer. */ PBYTE      pbXORMask;   /*  Pointer to XOR bit-mask pointer. */ PBYTE      pbBits;      /*  Pointer to color pointer image. */ ULONG      ulBpp;       /*  Color pointer bits per pel. */ ULONG      ulWidth;     /*  Pointer width in pels. */ ULONG      ulHeight;    /*  Pointer height in pels. */ POINTL     ptlHotspot;  /*  Pointer to hot spot coordinate. */ } HWSETPTRIN;

typedef  HWSETPTRIN   * PHWSETPTRIN ;


 * Fields
 * ulLength(ULONG) Size of the HWSETPTRIN data structure, in bytes.
 * pbANDMask(PBYTE) Pointer to AND bit-mask pointer.
 * pbXORMask(PBYTE) Pointer to XOR bit-mask pointer.
 * pbBits(PBYTE) Pointer to color pointer image.
 * ulBpp(ULONG) Color pointer bits per pel.
 * ulWidth(ULONG) Pointer width in pels.
 * ulHeight(ULONG) Pointer height in pels.
 * ptlHotspot Pointer to hot spot coordinate.

HWSETPTROUT
Output packet returned by the GRADD to the caller of the GHI_CMD_SETPTR function. typedef struct _HWSETPTROUT { ULONG    ulLength;  /*  Size of the HWSETPTROUT data structure, in bytes. */ ULONG     ulStatus;  /*  Current cursor description bits. */ } HWSETPTROUT;

typedef  HWSETPTROUT   * PHWSETPTROUT ;
 * Fields
 * ulLength(ULONG) Size of the HWSETPTROUT data structure, in bytes.
 * ulStatus(ULONG) Current cursor description bits.
 * Values are as follows:
 * POINTER_VISIBLE 0x0001; cursor is visible.
 * POINTER_COLOR 0x0002; cursor is color (vs. monochrome).
 * POINTER_SOFTWARE 0x0004; this GRADD is not using a hardware sprite.

HWSHOWPTRIN
Input packet to the GHI_CMD_SHOWPTR function.

typedef struct _HWSHOWPTRIN { ULONG    ulLength;  /*  Size of the HWSHOWPTRIN data structure, in bytes. */ BOOL      fShow;     /*  Indicates the visibility state of the pointer. */ } HWSHOWPTRIN;

typedef  HWSHOWPTRIN   * PHWSHOWPTRIN ;

FALSE Pointer is not visible.
 * Fields
 * ulLength(ULONG) Size of the HWSHOWPTRIN data structure, in bytes.
 * fShow(BOOL) Indicates the visibility state of the pointer.
 * Values are as follows:
 * TRUE Pointer is visible.

IMAGEBUF
Characteristics describing an image. typedef struct _IMAGEBUF { ULONG           ulLength;        /*  Length of IMAGEBUF data structure, in bytes. */ ULONG            ulFlags;         /*  Image buf flag. */ ULONG            ulType;          /*  Flag indicating type of memory:  VRAM or system. */ PBYTE            pBits;           /*  Virtual address of the image. */ ULONG            ulImgWidth;      /*  Image width, in pels. */ ULONG            ulImgHeight;     /*  Image height, in pels. */ ULONG            ulBytesPerScan;  /*  Bytes per scan line. */ PCOLORINFO       pColorInfo;      /*  Color space of data in buffer. */ PCODECINFO       pCodecInfo;      /*  Compression type of data in buffer. */ PCUSTPALINFO     pCustPalInfo;    /*  Pointer to custom palette information. */ } IMAGEBUF;

typedef  IMAGEBUF   * PIMAGEBUF ;


 * Fields
 * ulLength(ULONG) Length of IMAGEBUF data structure, in bytes.
 * ulFlags(ULONG) Image buf flag.
 * This flag has the following values:
 * IBF_Y_ORG_BOTTOM 0x0001; origin is set at bottom

Note:This flag can be used as an optimization for 8-bpp images for the following two conditions:

1.The hardware has support for cached custom palettes, and the client application is playing frames using the same palette. The driver will return IMG_CAPS_PAL_CACHING if it has this support.

2.The screen is in 256-color mode and the source image bits have already been translated to the current hardware palette.

IBF_IGNORE_CUST_PAL 0x0002; ignore the custom palette

IBT_SRC_MEM 0x0001; indicates source is system memory
 * ulType(ULONG) Flag indicating type of memory: VRAM or system.
 * This flag has the following values:
 * IBT_SRC_VRAM 0x0000; indicates source is VRAM memory
 * pBits(PBYTE) Virtual address of the image.
 * Not required if source is in VRAM.
 * ulImgWidth(ULONG) Image width, in pels.
 * ulImgHeight(ULONG) Image height, in pels.
 * ulBytesPerScan(ULONG) Bytes per scan line.
 * pColorInfo Color space of data in buffer.
 * pCodecInfo Compression type of data in buffer.
 * pCustPalInfo Pointer to custom palette information.

IMAGECAPS
Capabilities of the video accelerator driver. typedef struct _IMAGECAPS { ULONG         ulLength;         /*  Length of IMAGECAPS data structure, in bytes. */ ULONG          ulCaps;           /*  Flag that specifies image capabilities supported. */ ULONG          ulMaxHorz;        /*  Maximum horizontal pels supported by scaler. */ ULONG          ulMaxVert;        /*  Maximum vertical lines supported by scaler. */ BOOL           fAccelMem;        /*  Flag indicating whether the hardware accelerator has additional VRAM for use. */ ULONG          ulPhysAddrVRAM;   /*  Physical address of the hardware accelerator VRAM. */ ULONG          ulSize;           /*  Size of hardware accelerator VRAM, in bytes. */ ULONG          ulScanLineBytes;  /*  Size of scan line, in bytes. */ ULONG          ulNumCodecs;      /*  Number of FOURCCs that follow in this structure. */ PCODECINFO     pCodecList;       /*  Pointer to array of CODEC FOURCCs. */ ULONG          ulNumSrc;         /*  Number of source COLORINFO data structures pointed to by pSrcColorInfo. */ PCOLORINFO     pSrcColorInfo;    /*  Pointer to array of source COLORINFO data structures. */ ULONG          ulNumDst;         /*  Number of destination COLORINFO data structures pointed to by pDstColorInfo. */ PCOLORINFO     pDstColorInfo;    /*  Pointer to array of destination COLORINFO data structures. */ } IMAGECAPS;

typedef  IMAGECAPS   * PIMAGECAPS ;


 * Fields
 * ulLength(ULONG) Length of IMAGECAPS data structure, in bytes.
 * ulCaps(ULONG) Flag that specifies image capabilities supported.

This flag has the following values:

IMAGECAPS_STRETCHBLT 0x0001; has hardware stretch Blt assist IMAGECAPS_CAPTURE 0x0002; has capture to VRAM hardware present IMAGECAPS_1X_BLT 0x0004; has nonstretch Blt assist IMAGECAPS_WINDOWCLIP 0x0008; supports clipping in hardware and/or software IMAGECAPS_BUFALLOC 0x0010; supports allocation of on-card memory IMAGECAPS_RECTALLOC 0x0020; supports allocation of rectangles in on-card memory IMAGECAPS_COMP 0x0040; compression supported by driver IMAGECAPS_DECOMP 0x0080; decompression supported by driver IMAGECAPS_PAL_CACHING 0x0100; supports 8-bit palette caching IMAGECAPS_INTERPOL 0x0200; supports color interpolation in hardware IMAGECAPS_BYLOCSYSMEM 0x0400; able to read/write to system memory IMIAGECAPS_SEM_BYPASS 0x0800; device serialization not required IMAGECAPS_NO_SHARED_FB 0x1000; overlay device

FALSE VRAM not available.
 * ulMaxHorz(ULONG) Maximum horizontal pels supported by scaler.
 * ulMaxVert(ULONG) Maximum vertical lines supported by scaler.
 * fAccelMem(BOOL) Flag indicating whether the hardware accelerator has additional VRAM for use.
 * The following values are valid:
 * TRUE VRAM available.
 * ulPhysAddrVRAM(ULONG) Physical address of the hardware accelerator VRAM.
 * This parameter is valid only if fAccelMem = TRUE.
 * ulSize(ULONG) Size of hardware accelerator VRAM, in bytes.
 * This parameter is valid only if fAccelMem = TRUE.
 * ulScanLineBytes(ULONG) Size of scan line, in bytes.
 * Number of bytes includes padding. This parameter is valid only if fAccelMem = TRUE.
 * ulNumCodecs(ULONG) Number of FOURCCs that follow in this structure.
 * pCodecList Pointer to array of CODEC FOURCCs.
 * This field points to the array of FOURCCs supported by the hardware accelerator.
 * ulNumSrc(ULONG) Number of source data structures pointed to by pSrcColorInfo.
 * pSrcColorInfo Pointer to array of source COLORINFO data structures.
 * ulNumDst(ULONG) Number of destination COLORINFO data structures pointed to by pDstColorInfo.
 * pDstColorInfo Pointer to array of destination COLORINFO data structures.

IMAGEPACK
Information pertaining to PutImage and GetImage. typedef struct _IMAGEPACK { ULONG        ulLength;    /*  Length of IMAGEPACK data structure, in bytes. */ ULONG         ulFlags;     /*  Image pack flag. */ ULONG         ulHandle;    /*  Unique ID returned by VRAMREGISTEROUT. */ ULONG         ulID;        /*  Unique buffer ID. */ ULONG         ulCmdMask;   /*  Specific changes since the last frame. */ PIMAGEBUF     pPutBuf;     /*  Used as source image in PutImage command. */ PIMAGEBUF     pGetBuf;     /*  Used as destination image in GetImage command. */ POINTL        ptlDstOrg;   /*  Destination origin (origin at upper left). */ ULONG         ulDstXext;   /*  Destination X extent. */ ULONG         ulDstYext;   /*  Destination Y extent. */ POINTL        ptlSrcOrg;   /*  Offset into the source image. */ ULONG         ulSrcXext;   /*  Source X extent. */ ULONG         ulSrcYext;   /*  Source Y extent. */ ULONG         cVisRects;   /*  Number of output visible rectangles. */ PRECTL        prctlVis;    /*  Pointer to array of visible regions. */ POINTL        ptlWBOrg;    /*  Origin of off-screen VRAM work buffer. */ ULONG         cWBBytes;    /*  Number of bytes in the work buffer. */ PBYTE         pVirtVRAM;   /*  A 32-bit virtual pointer to the start of VRAM. */ ULONG         ulGrafXPar;  /*  Transparent color for overlay type devices. */ } IMAGEPACK;

typedef  IMAGEPACK   * PIMAGEPACK ;

IPC_RECTLS 0x0002; visible regions have changed IPC_SRC_COLOR 0x0004; source color information has changed IPC_DST_COLOR 0x0008; destination color information has changed IPC_PALETTE 0x0010; palette color information has changed IPC_SRC_SIZE 0x0020; source size information has changed IPC_DST_SIZE 0x0040; destination size information has changed IPC_DST_POS 0x0080; destination position information has changed IPC_DROP_FRAME 0x0100; ignore this frame
 * IMAGEPACK
 * ulLength(ULONG) Length of IMAGEPACK data structure, in bytes.
 * ulFlags(ULONG) Image pack flag.
 * This flag has the following value:
 * IPF_DONT_INTERPOLATE 0x0001; don't use hardware color interpolation
 * ulHandle(ULONG) Unique ID returned by.
 * ulID(ULONG) Unique buffer ID.
 * ulCmdMask(ULONG) Specific changes since the last frame.
 * The following values are valid:
 * IPC_INTERMEDIATE_PUT 0x0001; not used at this time
 * pPutBuf Used as source image in PutImage command.
 * pGetBuf(PIMAGEBUF) Used as destination image in GetImage command.
 * ptlDstOrg Destination origin (origin at upper left).
 * ulDstXext(ULONG) Destination X extent.
 * ulDstYext(ULONG) Destination Y extent.
 * ptlSrcOrg Offset into the source image.
 * ulSrcXext(ULONG) Source X extent.
 * ulSrcYext(ULONG) Source Y extent.
 * cVisRects(ULONG) Number of output visible rectangles.
 * prctlVis Pointer to array of visible regions.
 * ptlWBOrg Origin of off-screen VRAM work buffer.
 * cWBBytes(ULONG) Number of bytes in the work buffer.
 * pVirtVRAM(PBYTE) A 32-bit virtual pointer to the start of VRAM.
 * ulGrafXPar(ULONG) Transparent color for overlay type devices.

INITVDM
Data structure to initialize the full VDM session. typedef struct _INITVDM { ULONG    ulFlags;  /*  VDM initialization type. */ } INITVDM;

typedef  INITVDM   * PINITVDM ;


 * Fields
 * ulFlags(ULONG) VDM initialization type.
 * VDM_POSTLOAD 0x1 Adapter just loaded (used internally for initialization).
 * VDM_INITIALIZE 0x2 Force initialization of a permanently open VDM, even if previously initialized.

INTCRF
Data structure to make a bios call. typedef struct _INTCRF { ULONG     ulBIOSIntNo;  /*  0x10 for INT10 calls. */ VCRF       aCRF;         /*  Client register frame. */ BUFFER     pB[2];        /*  Description of input/output buffers. */ } INTCRF;

typedef  INTCRF   * PINTCRF ;


 * Fields
 * ulBIOSIntNo(ULONG) 0x10 for INT10 calls.
 * aCRF Client register frame.
 * pB[2] Description of input/output buffers.

INITPROCOUT
Information returned by the GRADD to the caller of the GHI_CMD_INITPROC function. typedef struct _INITPROCOUT { ULONG    ulLength;    /*  Length of the INITPROCOUT data structure, in bytes. */ ULONG     ulVRAMVirt;  /*  32-bit virtual address of VRAM. */ } INITPROCOUT;

typedef  INITPROCOUT   * PINITPROCOUT ;


 * Fields
 * ulLength(ULONG) Length of the INITPROCOUT data structure, in bytes.
 * ulVRAMVirt(ULONG) 32-bit virtual address of VRAM.

LINEINFO
Line information data structure shared by cLines in the alpkLinePack array. typedef struct _LINEINFO { ULONG        ulLength;      /*  Length of LINEINFO data structure. */ ULONG         ulType;        /*  Defines line type. */ ULONG         ulStyleMask;   /*  A 32-bit style mask. */ ULONG         cLines;        /*  Count of lines to be drawn. */ ULONG         ulFGColor;     /*  Line Foreground color. */ ULONG         ulBGColor;     /*  Line Background color. */ USHORT        usForeROP;     /*  Line Foreground mix. */ USHORT        usBackROP;     /*  Line Background mix. */ PBMAPINFO     pDstBmapInfo;  /*  Pointer to destination surface bit map. */ PLINEPACK     alpkLinePack;  /*  Pointer to LINEPACK data structure. */ PRECTL        prclBounds;    /*  Pointer to bounding rect of a clipped line. */ } LINEINFO;

typedef  LINEINFO   * PLINEINFO ;

LINE_INVISIBLE Line is not drawn. LINE_ALTERNATE Line will be alternating Foreground and Background color; ignores style. LR_INVERTMERGEPAT LR_MASKINVERTPAT LR_INVERTCOPYPAT LR_MASKPATINVERT LR_INVERT LR_XORPAT LR_INVERTMASKPAT LR_MASKPAT LR_INVERTXORPAT LR_LEAVEALONE LR_MERGEINVERTPAT LR_PATCOPY LR_MERGEPATINVERT LR_MERGEPAT LR_ONE
 * Field
 * ulLength(ULONG) Length of LINEINFO data structure.
 * ulType(ULONG) Defines line type.
 * LINE_SOLID Line will be solid in Foreground color.
 * ulStyleMask(ULONG) A 32-bit style mask.
 * cLines(ULONG) Count of lines to be drawn.
 * ulFGColor(ULONG) Line Foreground color.
 * ulBGColor(ULONG) Line Background color.
 * usForeROP(USHORT) Line Foreground mix.
 * usBackROP(USHORT) Line Background mix.
 * The following flags apply to ulForeROP and ulBackROP: LR_ZERO
 * pDstBmapInfo Pointer to destination surface bit map.
 * alpkLinePack(PLINEPACK) Pointer to data structure.
 * prclBounds Pointer to bounding rect of a clipped line.

LINEINFO2
Line information data structure for simple lines, used for and  functions.

The LINEINFO2 structure will never be passed to a GRADD unless the GRADD indicates it can handle both LINEINFO and LINEINFO2 structures by setting the DS_SIMPLE_LINES flag in the ulFCFlags member of. typedef struct _LINEINFO2 { ULONG        ulLength;        /*  Length of LINEINFO2 data structure. */ ULONG         ulType;          /*  Defines line type. */ ULONG         ulStyleMask;     /*  A 32-bit style mask. */ ULONG         cLines;          /*  Count of lines to be drawn. */ ULONG         ulFGColor;       /*  Line Foreground color. */ ULONG         ulBGColor;       /*  Line Background color. */ USHORT        usForeROP;       /*  Line Foreground mix. */ USHORT        usBackROP;       /*  Line Background mix. */ PBMAPINFO     pDstBmapInfo;    /*  Pointer to destination surface bit map. */ ULONG         ulFlags;         /*  Line flags. */ ULONG         ulXYStyleStep;   /*  Low byte of low word: x style, High byte of low word: y style. */ PULONG        pulStyleValue;   /*  Pointer to style value at start point. */ POINTL        ptlOrigin;       /*  Origin to be added to all coordinates. */ PPOINTL       pptlStart;       /*  Pointer to POINTL defining start point. */ PPOINTL       pptlLines;       /*  Pointer to POINTL array defining connected line endpoints. */ POINTL        ptlClipStart;    /*  Clipped start point if it is clipped. */ POINTL        ptlClipEnd;      /*  Clipped end point if it is clipped. */ LONG          lClipStartError; /*  Bresenham error at the clip start for first line. */ PRECTL        prclBounds;      /*  Pointer to bounding rect of clipped lines. */ } LINEINFO2;

typedef  LINEINFO2   * PLINEINFO2 ;

LINE_INVISIBLE Line is not drawn. LINE_ALTERNATE Line will be alternating Foreground and Background color; ignores style.
 * Fields
 * ulLength(ULONG) Length of LINEINFO2 data structure.
 * ulType(ULONG) Defines line type.
 * LINE_SOLID Line will be solid in Foreground color.
 * ulStyleMask(ULONG) A 32-bit style mask.
 * cLines(ULONG) Count of lines to be drawn.
 * ulFGColor(ULONG) Line Foreground color.
 * ulBGColor(ULONG) Line Background color.
 * usForeROP(USHORT) Line Foreground mix.
 * usBackROP(USHORT) Line Background mix.
 * The following flags apply to ulForeROP and ulBackROP:


 * LR_ZERO
 * LR_INVERTMERGEPAT
 * LR_MASKINVERTPAT
 * LR_INVERTCOPYPAT
 * LR_MASKPATINVERT
 * LR_INVERT
 * LR_XORPAT
 * LR_INVERTMASKPAT
 * LR_MASKPAT
 * LR_INVERTXORPAT
 * LR_LEAVEALONE
 * LR_MERGEINVERTPAT
 * LR_PATCOPY
 * LR_MERGEPATINVERT
 * LR_MERGEPAT
 * LR_ONE
 * pDstBmapInfo Pointer to destination surface bit map.
 * ulFlags(ULONG) Flags used for the LINEINFO2 data structure.

LINE_DO_FIRST_PEL Draw first pel of first line if not clipped. LINE_DO_LAST_PEL Draw last pel of last line if not clipped. LINE_MONO_INVERT Invert bits for mono destination. LINE_START_CLIP Start of first line is clipped. LINE_END_CLIP End of last line is clipped. LINE_Y_FLIP Flip Y for all lines. LINE_ALL_RADIAL All lines oriented 0, 45, 90, 135, 180, 225, 270, or 315 degrees. LINE_DISJOINT Successive pairs of points in pptlLines array define disconnected line segments.

ulXYStyleStep(ULONG) Low byte of low word: x style, High byte of low word: y style.
 * Field - ulXYStyleStep

The x style step is used for X-major lines where abs(dx) > abs(dy). The x style step is used for lines where abs(dx) < abs(dy).

The style step is added to the current style value for each pel.

pulStyleValue(PULONG) Pointer to style value at current pel.
 * Field - pulStyleValue

The style value is composed as an error value and a mask position, as follows: The style value is updated as lines are drawn.


 * Fields
 * ptlOrigin Origin to be added to all coordinates.
 * pptlStart(PPOINTL) Pointer to defining start point of first line.
 * pptlLines(PPOINTL) Pointer to array defining connected line endpoints.
 * The number of array entries is defined by.
 * ptlClipStart Clipped start point if it is clipped.
 * ptlClipEnd(POINTL) Clipped end point if it is clipped.
 * lClipStartError(LONG) Bresenham error at the clip start point for first line (not valid if first line is horizontal or vertical).
 * prclBounds Pointer to bounding rect of a clipped line.

LINEPACK
Line information data structure on a per-line basis. typedef struct _LINEPACK { ULONG       ulStyleStep;      /*  Value to be added to ulStyleValue. */ ULONG        ulStyleValue;     /*  Style value at the current pel. */ ULONG        ulFlags;          /*  Flags used for the LINEPACK data structure. */ LINEPACK     plpkNext;         /*  Pointer to next LINEPACK data structure. */ ULONG        ulAbsDeltaX;      /*  Clipped Bresenham Delta X, absolute. */ ULONG        ulAbsDeltaY;      /*  Clipped Bresenham Delta Y, absolute. */ POINTL       ptlClipStart;     /*  Pointer to location for device to perform Bresenham algorithm. */ POINTL       ptlClipEnd;       /*  Ending location for Bresenham algorithm (see ptlClipStart). */ POINTL       ptlStart;         /*  Pointer to starting location for line. */ POINTL       ptlEnd;           /*  Ending location for line. */ LONG         lClipStartError;  /*  Standard Bresenham error at the clipped start point. */ } LINEPACK;

typedef  LINEPACK   * PLINEPACK ;
 * Fields:ulStyleStep(ULONG) Value to be added to ulStyleValue.
 * The value to be added to ulStyleValue on each pel stepped along the style major direction.
 * ulStyleValue(ULONG) Style value at the current pel.
 * The style value is composed of an error value and a mask position, as follows:

high word   |3 bits       |5 bits       |8 bits -+-+-+--- not used    |not used     |mask pos     |error value
 * ulFlags(ULONG) Flags used for the LINEPACK data structure.
 * LINE_DO_FIRST_PEL Draws the first pel.
 * LINE_DIR_Y_POSITIVE Indicates line direction is bottom-to-top.
 * LINE_HORIZONTAL Indicates line is horizontal. No Bresenham algorithm.
 * LINE_X_MAJOR Line is XMAJOR.
 * LINE_DIR_X_POSITIVE Indicates line direction is left-to-right.
 * LINE_VERTICAL Indicates line is vertical. No Bresenham algorithm.
 * LINE_STYLE_X_MAJOR Line style is XMAJOR.
 * LINE_DO_LAST_PEL Draws the last pel.
 * plpkNext(LINEPACK) Pointer to next LINEPACK data structure.
 * ulAbsDeltaX(ULONG) Clipped Bresenham Delta X, absolute.
 * ulAbsDeltaY(ULONG) Clipped Bresenham Delta Y, absolute.
 * ptlClipStart Pointer to location for device to perform Bresenham algorithm.
 * Pointer to location where device performs the Bresenham algorithm. Sets only the pels from ptlClipStart to ptlClipEnd, inclusive.
 * ptlClipEnd(POINTL) Ending location for Bresenham algorithm (see ptlClipStart).
 * ptlStart(POINTL) Pointer to starting location for line.
 * The device can perform the Bresenham algorithm from ptlStart or ptlClipStart.
 * ptlEnd(POINTL) Ending location for line.
 * lClipStartError(LONG) Standard Bresenham error at the clipped start point.
 * Error is calculated from the initial error and the error increments for major step and diagonal step. The initial error and the error increments are as follows:
 * MAX Maximum (ulAbsDeltaX, ulAbsDeltaY)
 * MIN Minimum (ulAbsDeltaX, ulAbsDeltaY)
 * Major Increment Increment to the error for stepping along the major axis:
 * 2 * MIN.
 * Diagonal Increment Increment to the error for stepping along the major and minor axes:
 * 2 * MIN - 2 * MAX.
 * Initial Error Error at the start point:
 * 2 * MIN - MAX, if LINE_DIR_X_POSITIVE is On.
 * 2 * MIN - MAX - 1, if LINE_DIR_X_POSITIVE is Off.
 * Horizontal and vertical lines The line is drawn from the clipped start to clipped end.
 * The lClipStartError will not be given.
 * First pel consideration Set the first pel at ptlStart (not ptlClipStart) only if LINE_DO_FIRST_PEL is set and the first pel is not clipped.
 * Last pel consideration Set the last pel at ptlEnd (not ptlClipEnd) only if LINE_DO_LAST_PEL is set and the last pel is not clipped.
 * Styling Lines are styled using the ulStyleMask, ulStyleStep, and ulStyleValue.
 * ulStyleMask A 32-bit style mask.
 * Error Value Error value at the current pel.
 * Mask Position Bit position of the ulStyleMask.
 * If this bit is on, set the current pel to the ulFGColor through usForeROP; otherwise, set the current pel to the ulBGColor through usBackRop.

MEMINFO
Physical to linear virtual address range conversion structure. typedef struct _MEMINFO { ULONG      ulPhysAddr;      /* Start of physical address range. */ ULONG      ulMemLen;        /* Length of address range in bytes. */ ULONG      ulVirtAddr;      /* Virtual address corresponding to physical address range start. */                             /* (This linear virtual address is returned by VHPhysToVirt.) */ struct   _MEMINFO pNextMI; /* Pointer to the next MEMINFO structure in linked list. */                             /* In the last structure in the linked list, this must be set to NULL. */

} MEMINFO;

typedef  MEMINFO   * PMEMINFO ;
 * Fields
 * ulPhysAddr(ULONG)
 * ulMemLen(ULONG)
 * ulVirtAddr(ULONG)
 * pNextMI(struct_MEMINFO)

MONITORINFO
The MONITORINFO data structure receives information for the current video monitor. typedef struct _MONITORINFO { CHAR               szMonitor[MAX_MONITOR_LEN];          /*  Contains monitor information. */ MONITORMODEINFO     MonitorModeInfo[MAX_MONITOR_MODES];  /*  Contains information about the monitor mode. */ } MONITORINFO;

typedef  MONITORINFO   * FAR   * PMONITORINFO ;
 * Fields
 * szMonitor[MAX_MONITOR_LEN](CHAR) Contains monitor information.
 * MonitorModeInfo[MAX_MONITOR_MODES] Contains information about the monitor mode.

MONITORMODEINFO
Contains information on the types of monitor modes. typedef struct _MONITORMODEINFO { USHORT    usXResolution;  /*  Horizontal pixels. */ USHORT     usYResolution;  /*  Vertical scan lines. */ BYTE       bVertRefresh;   /*  Vertical refresh rate. */ BYTE       bHorizRefresh;  /*  Horizontal refresh rate. */ BYTE       bVPolarityPos;  /*  Vertical polarity. */ BYTE       bHPolarityPos;  /*  Horizontal polarity. */ USHORT     usScrnTop;      /*  Vertical blanking away from the top, in line counts. */ USHORT     usScrnBottom;   /*  Vertical blanking away from the bottom, in line counts. */ USHORT     usScrnLeft;     /*  Horizontal blanking away from the left, in pixel counts. */ USHORT     usScrnRight;    /*  Horizontal blanking away from the right, in pixel counts. */ } MONITORMODEINFO;

typedef  MONITORMODEINFO   * FAR   * PMONITORMODEINFO ;
 * Fields
 * usXResolution(USHORT) Horizontal pixels.
 * usYResolution(USHORT) Vertical scan lines.
 * bVertRefresh(BYTE) Vertical refresh rate.
 * bHorizRefresh(BYTE) Horizontal refresh rate.
 * bVPolarityPos(BYTE) Vertical polarity.
 * bHPolarityPos(BYTE) Horizontal polarity.
 * usScrnTop(USHORT) Vertical blanking away from the top, in line counts.
 * usScrnBottom(USHORT) Vertical blanking away from the bottom, in line counts.
 * usScrnLeft(USHORT) Horizontal blanking away from the left, in pixel counts.
 * usScrnRight(USHORT) Horizontal blanking away from the right, in pixel counts.

PALETTEDATA
The PALETTEDATA data structure contains information on the palette registers. typedef struct _PALETTEDATA { ULONG    ulPalCount;    /*  Specifies the number of bPaletteData entries that follow. */ ULONG     ulPalStart;    /*  Start index for data. */ BYTE      bPaletteData;  /*  One byte is allocated; start of palette. */ } PALETTEDATA;

typedef  PALETTEDATA   * FAR   * PPALETTEDATA ;
 * Fields
 * ulPalCount(ULONG) Specifies the number of bPaletteData entries that follow.
 * ulPalStart(ULONG) Start index for data.
 * bPaletteData(BYTE) One byte is allocated; start of palette.

POINTL
Point structure (long integers). typedef struct _POINTL { LONG    x;  /*  X-coordinate. */ LONG     y;  /*  Y-coordinate. */ } POINTL;

typedef  POINTL   * PPOINTL ;
 * Fields
 * x(LONG) X-coordinate.
 * y(LONG) Y-coordinate.

RECTL
Rectangle structure. typedef struct _RECTL { LONG    xLeft;    /*  X-coordinate of left-hand edge of rectangle. */ LONG     yBottom;  /*  Y-coordinate of bottom edge of rectangle. */ LONG     xRight;   /*  X-coordinate of right-hand edge of rectangle. */ LONG     yTop;     /*  Y-coordinate of top edge of rectangle. */ } RECTL;

typedef  RECTL   * PRECTL ;
 * Fields
 * xLeft(LONG) X-coordinate of left-hand edge of rectangle.
 * yBottom(LONG) Y-coordinate of bottom edge of rectangle.
 * xRight(LONG) X-coordinate of right-hand edge of rectangle.
 * yTop(LONG) Y-coordinate of top edge of rectangle.

RGB
RGB color value. typedef struct _RGB { BYTE    bBlue;   /*  Blue component of the color definition. */ BYTE     bGreen;  /*  Green component of the color definition. */ BYTE     bRed;    /*  Red component of the color definition. */ } RGB;

typedef  RGB   * PRGB ;
 * Fields
 * bBlue(BYTE) Blue component of the color definition.
 * bGreen(BYTE) Green component of the color definition.
 * bRed(BYTE) Red component of the color definition.

RGB2
RGB color value. typedef struct _RGB2 { BYTE    bBlue;      /*  Blue component of the color definition. */ BYTE     bGreen;     /*  Green component of the color definition. */ BYTE     bRed;       /*  Red component of the color definition. */ BYTE     fcOptions;  /*  Entry options. */ } RGB2;

typedef  RGB2   * PRGB2;
 * Fields
 * bBlue(BYTE) Blue component of the color definition.
 * bGreen(BYTE) Green component of the color definition.
 * bRed(BYTE) Red component of the color definition.
 * fcOptions(BYTE) Entry options.
 * These can be ORed together if required:
 * PC_RESERVED The color entry is reserved for animating color with the palette manager.
 * PC_EXPLICIT The low-order word of the color table entry designates a physical palette slot. This allows an application to show the actual contents of the device palette as realized for other logical palettes. This does not prevent the color in the slot from being changed for any reason.

SVGARGB
The SVGARGB data structure contains the values of RGB. typedef struct _SVGARGB { BYTE    bR;       /*  Value of Red. */ BYTE     bG;       /*  Value of Green. */ BYTE     bB;       /*  Value of Blue. */ BYTE     bUnused;  /*  Reserved. */ } SVGARGB;

typedef  SVGARGB   * FAR   * PSVGARGB ;
 * Fields
 * bR(BYTE) Value of Red.
 * bG(BYTE) Value of Green.
 * bB(BYTE) Value of Blue.
 * bUnused(BYTE) Reserved.

TEXTBLTINFO
Information structure used for and  functions. The TEXTBLTINFO structure includes a pointer to. typedef struct _TEXTBLTINFO { ULONG           ulLength;        /*  Length of the TEXTBLTINFO structure, in bytes. */ ULONG            flOptions;       /*  Not used. */ ULONG            lGlyphCnt;       /*  Count of glyph indices provided on this call. */ PLONG            pGlyphIndicies;  /*  Pointer to glyph indices. */ ULONG            ulFGMix;         /*  Foreground mix mode. */ ULONG            ulBGMix;         /*  Background mix mode. */ ULONG            ulFGColor;       /*  Foreground colors. */ ULONG            ulBGColor;       /*  Background colors. */ PBMAPINFO        pDstBmapInfo;    /*  Pointer to destination physical surface descriptions. */ PDEVFONTINFO     pDevFntInfo;     /*  Pointer to DEVFONTINFO for additional font information. */ ULONG            ulClpCnt;        /*  Number of clip regions that intersect glyph data. */ PBLTRECT         abrClipRects;    /*  Array of ulClpCnt clip rectangles. */ PPOINTL          aptlSrcOrg;      /*  Array of glyph origin points. */ PBLTRECT         abrDst;          /*  Array of destination rectangles. */ } TEXTBLTINFO;

typedef  TEXTBLTINFO   * PTEXTBLTINFO ;
 * Fields
 * ulLength(ULONG) Length of the TEXTBLTINFO structure, in bytes.
 * flOptions(ULONG) Not used.
 * lGlyphCnt(ULONG) Count of glyph indices provided on this call.
 * If the specified device does not support clipping, then this field may not match actual characters in the original string. Each glyph will be repeated for each clipping rectangle of that character.
 * pGlyphIndicies(PLONG) Pointer to glyph indices.
 * This string can also be modified based on lGlyphCnt conditions. Refer to for example structures to access glyph information. The lowest byte is used to access the low byte table and the 2nd to lowest byte is used to access the high byte table.
 * ulFGMix(ULONG) Foreground mix mode.
 * ulBGMix(ULONG) Background mix mode.
 * ulFGColor(ULONG) Foreground colors.
 * ulBGColor(ULONG) Background colors.
 * pDstBmapInfo Pointer to destination physical surface descriptions.
 * pDevFntInfo Pointer to P for additional font information.
 * ulClpCnt(ULONG) Number of clip regions that intersect glyph data.
 * abrClipRects Array of ulClpCnt clip rectangles.
 * aptlSrcOrg Array of glyph origin points.
 * abrDst Array of destination rectangles.

USERCAPSIN
Information structure used for and  functions. typedef struct _USERCAPSIN { ULONG    ulLength;    /*  Length of the USERCAPSIN structure in bytes. */ ULONG     ulFunction;  /*  Specifies the QUERYCAPS, QUERYCAPSLIST, or SETCAPS subfunctions. */ ULONG     ulSize;      /*  Length, in bytes, of buffer area. */ } USERCAPSIN;

typedef USERCAPSIN *PUSERCAPSIN;
 * Fields
 * ulLength(ULONG) Length of the USERCAPSIN structure in bytes.
 * ulFunction(ULONG) Specifies the QUERYCAPS, QUERYCAPSLIST, or SETCAPS subfunctions.
 * The subfunctions, specified by the ulFunction field of the USERCAPSIN structure, may be defined as follows:
 * QUERYCAPS


 * 1) define QUERYCAPS     1L
 * QUERYCAPS returns the number of capabilities and capability descriptions in the buffer area pointed to by pOut.
 * Because the values for each capability are not yet allocated, the pValueList, pCurrentValue, and pDefaultValue fields in the structures must not be filled in for this call.
 * The driver must ensure that the buffer area size, specified by ulSize, is sufficient for the supported number of capabilities. If not, the driver should return the number of capabilities supported in the first word of the buffer area and a return code of RC_ERROR. The driver will be reinvoked with a larger buffer area for QUERYCAPS. This allows a driver to export multiple capabilities (each, in turn, gets its own page in the System Object notebook).
 * QUERYCAPSLIST


 * 1) define QUERYCAPSLIST   2L
 * QUERYCAPSLIST fills the pValueList, pCurrentValue, and pDefaultValue fields in the structure pointed to by pOut. The members must be 0 padded up to the length specified by ulValueMemberSize.
 * SETCAP


 * 1) define SETCAP    3L
 * SETCAP sets a value that the user has selected. The value is specified in the pCurrentValue field of the structure pointed to by pOut.
 * ulSize(ULONG) Length, in bytes, of buffer area.

VCRF
Data structure inside containing the register values to be passed in the bios call. typedef struct _VCRF { ULONG    reg_eax; ULONG    reg_ebx; ULONG    reg_ecx; ULONG    reg_edx; ULONG    reg_ebp; ULONG    reg_esi; ULONG    reg_edi; ULONG    reg_ds; ULONG    reg_es; ULONG    reg_fs; ULONG    reg_gs; ULONG    reg_cs; ULONG    reg_eip; ULONG    reg_eflag; ULONG    reg_ss; ULONG    reg_esp; } VCRF;
 * Fields
 * reg_eax(ULONG)
 * reg_ebx(ULONG)
 * reg_ecx(ULONG)
 * reg_edx(ULONG)
 * reg_ebp(ULONG)
 * reg_esi(ULONG)
 * reg_edi(ULONG)
 * reg_ds(ULONG)
 * reg_es(ULONG)
 * reg_fs(ULONG)
 * reg_gs(ULONG)
 * reg_cs(ULONG)
 * reg_eip(ULONG)
 * reg_eflag(ULONG)
 * reg_ss(ULONG)
 * reg_esp(ULONG)

VIDEO_ADAPTER
The VIDEO_ADAPTER data structure receives information for the desktop mode. typedef struct _VIDEO_ADAPTER { HVIDEO           hvideo;    /*  The handle for this adapter. */ ADAPTERINFO       Adapter;   /*  Hardware information for this adapter. */ VIDEOMODEINFO     ModeInfo;  /*  Information about the current video mode. */ } VIDEO_ADAPTER;

typedef VIDEO_ADAPTER *FAR *PVIDEO_ADAPTER;
 * Fields
 * hvideo(HVIDEO) The handle for this adapter.
 * Adapter Hardware information for this adapter.
 * ModeInfo Information about the current video mode.

VIDEOMODEINFO
The VIDEOMODEINFO data structure receives information for the current video monitor.

typedef struct _VIDEOMODEINFO { ULONG     cb;                 /* Size of the structure. */ MODEID     miModeId;           /* Used to make a SetMode request. */ USHORT     usType;             /* Flag indicating mode type. */ USHORT     usInt10ModeSet;     /* Interrupt 10 mode. */ USHORT     usXResolution;      /* Horizontal pixels. */ USHORT     usYResolution;      /* Vertical scanlines. */ ULONG      ulBufferAddress;    /* Physical address of VRAM. */ ULONG      ulApertureSize;     /* VRAM aperture. */ ULONG      ulColors;           /* Color depth. */ BYTE       bBitsPerPixel;      /* Pixel depth. */ BYTE       bBitPlanes;         /* Number of planes. */ BYTE       bXCharSize;         /* Font width. */ BYTE       bYCharSize;         /* Font height. */ USHORT     usBytesPerScanLine; /* Number of bytes per scan line. */ USHORT     usTextRows;         /* Number of text rows. */ ULONG      ulPageLength;       /* Number of bytes to save a plane. */ ULONG      ulSavesize;         /* Total bytes of VRAM to save. */ BYTE       bVrtRefresh;        /* Vertical refresh rate. */ BYTE       bHrtRefresh;        /* Horizontal refresh rate. */ BYTE       bVrtPolPos;         /* Vertical polarity. */ BYTE       bHrtPolPos;         /* Horizontal polarity. */ USHORT     usScrnTop;          /* Vertical blanking away from the top, in line counts. */ USHORT     usScrnBottom;       /* Vertical blanking away from the bottom, in line counts. */ USHORT     usScrnLeft;         /* Horizontal blanking away from the left, in pixel counts. */ USHORT     usScrnRight;        /* Horizontal blanking away from the right, in pixel counts. */ CHAR       szColorFormat[8];   /* Color format string for true color or high-color modes. */ CHAR       szColorWeight[8];   /* Color weight string for true color or high-color modes. */ } VIDEOMODEINFO;
 * Note: The cband ulColorsfields are new to VIDEDOMODEINFO. The color depth field (ulColors) was introduced to differentiate between pixel and color depth.

typedef VIDEOMODEINFO *FAR *PVIDEOMODEINFO;
 * Fields:cb(ULONG) Size of the structure.
 * miModeId(MODEID) Used to make a SetMode request.
 * usType(USHORT) Flag indicating mode type.
 * The following values are valid for this flag:
 * MODE_FLAG_NOT_MONO 0x0001; Mono-compatible
 * MODE_FLAG_GRAPHICS 0x0002; Text mode, Graphics
 * MODE_FLAG_NO_CLR_BRST 0x0004; Disable Color burst
 * MODE_FLAG_NATIVE 0x0008; Native (advanced function) mode
 * IGNORE_CLR_BRST 0x0010; Disable color burst; doesn't make sense for this mode
 * NOT_PLASMA 0x0020; will not work on plasma display
 * MODE_FLAG_VGA_ENTRY 0x0040; VGA mode, needs clean up
 * usInt10ModeSet(USHORT) Interrupt 10 mode.
 * usXResolution(USHORT) Horizontal pixels.
 * usYResolution(USHORT) Vertical scanlines.
 * ulBufferAddress(ULONG) Physical address of VRAM.
 * ulApertureSize(ULONG) VRAM aperture.
 * ulColors(ULONG) Color depth.
 * bBitsPerPixel(BYTE) Pixel depth.
 * bBitPlanes(BYTE) Number of planes.
 * bXCharSize(BYTE) Font width.
 * bYCharSize(BYTE) Font height.
 * usBytesPerScanLine(USHORT) Number of bytes per scan line.
 * usTextRows(USHORT) Number of text rows.
 * ulPageLength(ULONG) Number of bytes to save a plane.
 * ulSavesize(ULONG) Total bytes of VRAM to save.
 * bVrtRefresh(BYTE) Vertical refresh rate.
 * bHrtRefresh(BYTE) Horizontal refresh rate.
 * bVrtPolPos(BYTE) Vertical polarity.
 * bHrtPolPos(BYTE) Horizontal polarity.
 * usScrnTop(USHORT) Vertical blanking away from the top, in line counts.
 * usScrnBottom(USHORT) Vertical blanking away from the bottom, in line counts.
 * usScrnLeft(USHORT) Horizontal blanking away from the left, in pixel counts.
 * usScrnRight(USHORT) Horizontal blanking away from the right, in pixel counts.
 * szColorFormat[8](CHAR) Color format string for true color or high-color modes.
 * szColorWeight[8](CHAR) Color weight string for true color or high-color modes.

VIDEORESOURCEPACK
The VIDEORESOURCEPACK data structure contains resource information and definitions. typedef struct _VIDEORESOURCEPACK { ULONG    ConsRes;    /*  An array of resource definitions. */ ULONG     ulNumCons;  /*  Number of resources. */ } VIDEORESOURCEPACK;

typedef  VIDEORESOURCEPACK   * FAR   * PVIDEORESOURCEPACK ;
 * Fields:ConsRes(ULONG) An array of resource definitions.
 * ulNumCons(ULONG) Number of resources.

VIDEOSTATE
The VIDEOSTATE data structure receives information for the mode to be saved. typedef struct _VIDEOSTATE { ULONG        fStateFlags;     /*  Flag indicating what to save. */ MODEID        miState;         /*  Contains the mode ID for the mode to be saved. */ PVOID         pModeData;       /*  Pointer to set mode command sequence. */ ULONG         ulVRAMSaveSize;  /*  Number of bytes per page to save. */ PVRAMDATA     pVRAM;           /*  Pointer to video memory. */ PCLUTDATA     pCLUT;           /*  Pointer to palette data. */ PFONTDATA     pFONT;           /*  Pointer to font data. */ } VIDEOSTATE;

typedef  VIDEOSTATE   * FAR   * PVIDEOSTATE ;
 * Fields:fStateFlags(ULONG) Flag indicating what to save.
 * STATEFLAG_REGISTERS 0x0001
 * STATEFLAG_CLUT 0x0002
 * STATEFLAG_VRAM 0x0004
 * STATEFLAG_FONT 0x0008
 * miState(MODEID) Contains the mode ID for the mode to be saved.
 * pModeData(PVOID) Pointer to set mode command sequence.
 * ulVRAMSaveSize(ULONG) Number of bytes per page to save.
 * pVRAM(PVRAMDATA) Pointer to video memory.
 * pCLUT(PCLUTDATA) Pointer to palette data.
 * pFONT(PFONTDATA) Pointer to font data.

VMIQCI
Output packet returned by the GRADD to the caller of the VMI_CMD_ QUERYCHAININFO function. typedef struct _VMIQCI { ULONG         ulLength;  /*  Size of the VMIQCI data structure, in bytes. */ PCHAININFO     pciHead;   /*  Pointer to the head of the GRADD chain. */ } VMIQCI;

typedef VMIQCI *PVMIQCI;
 * Fields:ulLength(ULONG) Size of the VMIQCI data structure, in bytes.
 * pciHead Pointer to the head of the GRADD chain.

VRAMALLOCIN
Input packet to the GHI_CMD_VRAM function. typedef struct _VRAMALLOCIN { ULONG    ulLength;    /*  Size of the VRAMALLOCIN data structure, in bytes. */ ULONG     ulFlags;     /*  Flag indicating type of VRAM allocation. */ ULONG     ulID;        /*  ID required as input only on deallocation. */ ULONG     ulFunction;  /*  Requested function: allocate, deallocate, or query. */ ULONG     ulHandle;    /*  Handle returned from registering. */ ULONG     ulSize;      /*  Requested allocation size in bytes. */ ULONG     ulWidth;     /*  Requested allocation width in pixels. */ ULONG     ulHeight;    /*  Requested allocation height in scanlines. */ } VRAMALLOCIN;

typedef VRAMALLOCIN *PVRAMALLOCIN;
 * Fields:ulLength(ULONG) Size of the VRAMALLOCIN data structure, in bytes.
 * ulFlags(ULONG) Flag indicating type of VRAM allocation.
 * Values are as follows:
 * VRAM_ALLOC_SHARED 0x0001
 * VRAM_ALLOC_RECTANGLE 0x0002
 * VRAM_ALLOC_STATIC 0x1000
 * ulID(ULONG) ID required as input only on deallocation.
 * ulFunction(ULONG) Requested function: allocate, deallocate, or query.
 * Values are as follows:
 * VRAM_ALLOCATE 1
 * VRAM_DEALLOCATE 2
 * VRAM_QUERY 3
 * ulHandle(ULONG) Handle returned from registering.
 * ulSize(ULONG) Requested allocation size in bytes.
 * ulWidth(ULONG) Requested allocation width in pixels.
 * ulHeight(ULONG) Requested allocation height in scanlines.

VRAMALLOCOUT
Output packet returned by the GRADD to the caller of the GHI_CMD_VRAM function. typedef struct _VRAMALLOCOUT { ULONG     ulLength;         /*  Size of the VRAMALLOCOUT data structure, in bytes. */ ULONG      ulFlags;          /*  Flag indicating type of VRAM allocation. */ ULONG      ulID;             /*  ID returned on allocation. */ POINTL     ptlStart;         /*  X and Y location of VRAM. */ ULONG      ulSize;           /*  Requested size of VRAM, in bytes. */ ULONG      ulScanLineBytes;  /*  Length of scan line, in bytes. */ } VRAMALLOCOUT;

typedef VRAMALLOCOUT *PVRAMALLOCOUT;
 * Fields:ulLength(ULONG) Size of the VRAMALLOCOUT data structure, in bytes.
 * ulFlags(ULONG) Flag indicating type of VRAM allocation.
 * Value is as follows:
 * VRAM_ALLOC_WORKBUFFER 0x0004
 * ulID(ULONG) ID returned on allocation.
 * ptlStart X and Y location of VRAM.
 * ulSize(ULONG) Requested size of VRAM, in bytes.
 * ulScanLineBytes(ULONG) Length of scan line, in bytes.

VRAMDATA
The VRAMDATA data structure is a pointer to video memory. typedef BYTE VRAMDATA;

VRAMIN
Input packet to the function. typedef struct _VRAMIN { ULONG    ulLength;    /*  Size of the VRAMIN data structure, in bytes. */ ULONG     ulFunction;  /*  Flag indicating type of VRAM allocation. */ PVOID     pIn;         /*  Pointer to an allocate or register packet. */ } VRAMIN;

typedef VRAMIN *PVRAMIN;
 * Fields:ulLength(ULONG) Size of the VRAMIN data structure, in bytes.
 * ulFunction(ULONG) Flag indicating type of VRAM allocation.
 * Values are as follows:
 * VRAM_ALLOCATE 1
 * VRAM_DEALLOCATE 2
 * VRAM_QUERY 3
 * VRAM_REGISTER 4
 * VRAM_DEREGISTER 5
 * pIn(PVOID) Pointer to an allocate or register packet.
 * If the ulFunction field of the VRAMIN structure is set to VRAM_ALLOCATE, VRAM_DEALLOCATE, or VRAM_QUERY, then pIn points to a data structure.
 * If the ulFunction field of the VRAMIN structure is set to VRAM_REGISTER or VRAM_DEGISTER, then pIn points to a data structure.

VRAMREGISTERIN
Input packet to the GHI_CMD_VRAM function via the VRAMIN data structure. typedef struct _VRAMREGISTERIN { ULONG    ulLength;  /* Size of the VRAMREGISTERIN data structure, in bytes. */ ULONG     ulHandle;  /* Handle required as input on deregister. */ ULONG     ulFlags;   /* Flag indicating type of VRAM registration. */ } VRAMREGISTERIN;

typedef VRAMREGISTERIN *PVRAMREGISTERIN;


 * Fields
 * ulLength(ULONG) Size of the VRAMREGISTERIN data structure, in bytes.
 * ulHandle(ULONG) Handle required as input on deregister.
 * ulFlags(ULONG) Flag indicating type of VRAM registration.
 * Values are as follows:
 * VRAM_REGISTER_HANDLE 0x0001
 * VRAM_REGISTER_VRAMONLY 0x1000

VRAMREGISTEROUT
Output packet returned by the GRADD to the caller of the GHI_CMD_VRAM function via the VRAMIN data structure. typedef struct _VRAMREGISTEROUT { ULONG    ulLength;  /* Size of the VRAMREGISTEROUT data structure, in bytes. */ ULONG     ulFlags;   /* Not used at this time. */ ULONG     ulHandle;  /* Handle returned on register. */ } VRAMREGISTEROUT;

typedef VRAMREGISTEROUT *PVRAMRGISTEROUT;
 * Fields
 * ulLength(ULONG) Size of the VRAMREGISTEROUT data structure, in bytes.
 * ulFlags(ULONG) Not used at this time.
 * ulHandle(ULONG) Handle returned on register.