## Graphics Adapter Device Driver Reference

[prev][next][parent][TOC]

### GHI_CMD_PALETTE

Select an item:

    Syntax
    Parameters
    Returns
    Remarks
    Glossary

Description:

GHI_CMD_PALETTE is mandatory if the device supports 256-color modes. This function is called to set or query the hardware palette. The GRADD is expected to respond by describing the palette in a given array or by using the palette given in the array. The GRADD is always given an HWPALETTEINFO structure with either the PALETTE_GET or PALETTE_SET flag to specify the operation to perform.

    #include <GRADD.h>

    GID      gid;         /*  ID of the GRADD. */

    ULONG    ulFunction;  /*  Set equal to GHI_CMD_PALETTE. */

    PVOID    pIn;         /*  Pointer to an HWPALETTEINFO structure. */

    PVOID    pOut;        /*  NULL; no output structure is needed. */

    ULONG    rc;          /*  Return codes. */

    rc = HWENTRY(gid, ulFunction, pIn, pOut);