This function sets the palette associated with the destination of DiveBlitImage. This capability is useful for outputting direct color image formats on 8-bit (256) displays. If no destination palette has been set, direct color space to LUT8 color-space conversion will be performed assuming the destination palette is the standard OS/2 palette. If DIVE is being used to transfer direct color images to an 8-bit display and the physical palette changes, it is expected that the application will provide notification of the change to the DIVE instance using this function.
#include <dive.h>
HDIVE hDiveInst; /* Display engine DIVE instance. */
ULONG ulStartIndex; /* Index of first palette entry to set. */
ULONG ulNumEntries; /* Number of palette entries to set. */
PBYTE pbRGB2Entries; /* Palette for target image space. */
ULONG rc; /* Return codes. */
rc = DiveSetDestinationPalette(hDiveInst,
ulStartIndex, ulNumEntries, pbRGB2Entries);