IDirectDrawSurface::GetPixelFormat

HRESULT GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat);

Returns the color and pixel format of the surface.

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

DDERR_INVALIDOBJECT DDERR_INVALIDPARAMS

DDERR_INVALIDSURFACETYPE

lpDDPixelFormat

Address of the DDPIXELFORMAT structure that will be filled in with a detailed description of the current pixel and color space format of the surface.