IDirectDrawSurface2::GetPixelFormat

HRESULT GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat);

Retrieves 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 with a detailed description of the current pixel and color space format of the surface.