Microsoft DirectX 9.0


The PreparePalette method sets up a palette, based on a media type from the owning filter.


HRESULT PreparePalette(
    const CMediaType *pmtNew,
    const CMediaType *pmtOld,
    LPSTR szDevice



Pointer to the new media type. The format block must be a VIDEOINFOHEADER structure.


Pointer to the old media type. If the media type is being set for the first time, this parameter can be an empty type with no format block. Otherwise, the format block must be a VIDEOINFOHEADER structure.


Pointer to a string that contains the name of the display device, as returned by the GDI EnumDisplayDevices function. To use the main display device, set this parameter to NULL.

Return Value

Returns S_OK if the palette was updated, or S_FALSE if the palette did not change.


If the palette needs to be updated, this method performs the following actions:

See Also