## Graphics Adapter Device Driver Reference

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

### VMI_CMD_PALETTE

Select an item:

    Syntax
    Parameters
    Returns
    Remarks
    Glossary

Description:

This function is called to query or set the hardware color palette. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

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 specifiy the operation to perform.

    #include <GRADD.h>

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

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

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

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

    ULONG    rc;          /*  Return codes. */

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