DirectX SDK

DirectDrawSurface7.GetPixelFormat

The DirectDrawSurface7.GetPixelFormat method retrieves the color and pixel format of the surface.

object.GetPixelFormat(pf As DDPIXELFORMAT)

Parameters

object
Object expression that resolves to a DirectDrawSurface7 object.
pf
DDPIXELFORMAT type to be filled with a detailed description of the current pixel and color space format of the surface.

Error Codes

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

DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_INVALIDSURFACETYPE