Microsoft DirectX 9.0


The GetFourCCCodes method gets the FourCC codes (four-character codes) supported by the DirectDraw object. GetFourCCCodes can also be used to return the number of codes supported.


  DWORD FAR *lpNumCodes,
  DWORD FAR *lpCodes



Points to a DWORD that contains the number of entries the lpCodes array can hold. If this number is too small to accommodate all the codes, it will be set to the required number and the lpCodes array will be filled with all that will fit.


Points to an array of DWORD's that will be filled in with the FourCC codes supported by this DirectDraw object.  If NULL is passed, then lpNumCodes will be set to the number of supported FourCC codes and the method will return.

Return Values

Value Description
DD_OK The method succeeded.
DDERR_INVALIDOBJECT DirectDraw received a pointer that was an invalid DirectDraw object.
DDERR_INVALIDPARAMS One or more of the input parameters is invalid.

See Also