This function sets the palette associated with the source data to be used for translating from 8-bit (LUT8) format to other color formats, for example, RGB 5-6-5 or RGB24.
#include <dive.h>
HDIVE hDiveInst; /* Display engine DIVE instance. */
ULONG ulStartIndex; /* First palette entry to set. */
ULONG ulNumEntries; /* Number of palette entries to set. */
PBYTE pbRGB2Entries; /* RGB values to be set. */
ULONG rc; /* Return codes. */
rc = DiveSetSourcePalette(hDiveInst, ulStartIndex,
ulNumEntries, pbRGB2Entries);