IDirectDrawSurface2::GetPalette

HRESULT GetPalette(LPDIRECTDRAWPALETTE FAR * lplpDDPalette);

Retrieves the DirectDrawPalette structure associated with this surface.

·Returns DD_OK if successful, or one of the following error values otherwise:

DDERR_GENERIC

DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS

DDERR_NOEXCLUSIVEMODE

DDERR_NOPALETTEATTACHED

DDERR_SURFACELOST

DDERR_UNSUPPORTED

lplpDDPalette

Address of a pointer to a DirectDrawPalette structure associated with this surface. This parameter will be set to NULL if no DirectDrawPalette structure is associated with this surface. If the surface is the primary surface, or a back buffer to the primary surface, and the primary surface is in 8-bpp mode, this parameter will contain a pointer to the system palette.