DirectX SDK

DirectDrawSurface7.GetPalette

The DirectDrawSurface7.GetPalette method retrieves the DirectDrawPalette object associated with this surface.

object.GetPalette() As DirectDrawPalette

Parameters

object
Object expression that resolves to a DirectDrawSurface7 object.

Return Values

If the method succeeds, it returns a DirectDrawPalette object.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DDERR_GENERIC
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_NOEXCLUSIVEMODE
DDERR_NOPALETTEATTACHED
DDERR_SURFACELOST
DDERR_UNSUPPORTED

Remarks

The object returned by a successful function call must be assigned to a DirectDrawPalette object variable. For example:

Dim DDPalette as DirectDrawPalette
Set DDPalette = object.GetPalette()

See Also

DirectDrawSurface7.SetPalette