IDirectDraw2::GetFourCCCodes

HRESULT GetFourCCCodes(LPDWORD lpNumCodes, LPDWORD lpCodes);

Retrieves the FourCC codes supported by the DirectDraw object. This method can also retrieve the number of codes supported.

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

DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS

lpNumCodes

Address of a variable that contains the number of entries the array pointed to by lpCodes can hold. If the number of entries is too small to accommodate all the codes, lpNumCodes is set to the required number and the array pointed to by lpCodes is filled with all that fits.

lpCodes

Address of an array of variables that will be filled with FourCC codes supported by this DirectDraw object. If NULL is passed, lpNumCodes is set to the number of supported FourCC codes and the method will return.