VP_STATUS
VgaSetPaletteReg(
      PHW_DEVICE_EXTENSION HwDeviceExtension,
      PVIDEO_PALETTE_DATA PaletteBuffer,
      ULONG PaletteBufferSize
  );

Routine Description:

    This routine sets a specified portion of the EGA (not DAC) palette
    registers.

Arguments:

    HwDeviceExtension - Pointer to the miniport driver's device extension.

    PaletteBuffer - Pointer to the structure containing the palette data.

    PaletteBufferSize - Length of the input buffer supplied by the user.

Return Value:

    NO_ERROR - information returned successfully

    ERROR_INSUFFICIENT_BUFFER - input buffer not large enough for input data.

    ERROR_INVALID_PARAMETER - invalid palette size.