Microsoft Windows CE 3.0  

CBaseControlVideo::GetVideoPaletteEntries

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Retrieves a range of palette entries for the video.

HRESULT
GetVideoPaletteEntries(
long
StartIndex
,
long
Entries
,
long
*
pRetrieved
,
long
*
pPalette
);

Parameters

StartIndex
Zero-based start palette entry.
Entries
Number of entries required.
pRetrieved
Number of colors obtained.
pPalette
Pointer to output buffer for colors.

Return Values

Returns NOERROR if successful, VFW_E_NO_PALETTE_AVAILABLE if the video samples has no color palette, E_OUTOFMEMORY if there is not enough memory available, E_INVALIDARG if StartIndexis invalid, or S_FALSE if there are no colors in the palette.

Remarks

This member function returns the current palette of the video as an array allocated by the user. To remain consistent, use the members in the Win32 PALETTEENTRYstructure to return the colors, rather than the members in the RGBQUADstructure (although the parameter is a LONG). The memory is allocated by the caller, so simply copy each in turn. Determine that the number of entries requested and the start position offset are both valid. If the number of entries evaluates to zero, return an S_FALSE code.