DrvGetDirectDrawInfo

BOOL DrvGetDirectDrawInfo(
   DHPDEV dhpdev,
   DD_HALINFO  *pHalInfo,
   DWORD *pdwNumHeaps,
   VIDEOMEMORY  *pvmList,
   DWORD  pdwNumFourCC,
   DWORD  *pdwFourCC
);

DrvGetDirectDrawInfo gets the capabilities of the graphics hardware.

Parameters

dhpdev

Handle to the PDEV that was returned by the driver’s DrvEnablePDEV routine.

pHalInfo

Pointer to a DD_HALINFO structure in which the driver should return its supported hardware capabilities.

pdwNumHeaps

Pointer to a DWORD in which the number of VIDEOMEMORY structures pointed to by pvmList is returned.

pvmList

Pointer to an array of VIDEOMEMORY structures in which the driver should return information about each video memory chunk that it controls.

pdwNumFourCC

Pointer to a DWORD in which the number of DWORDs pointed to by pdwFourCC is returned.

pdwFourCC

Pointer to an array of DWORDs in which the driver should return information about each FOURCC that it supports.

Return Value

DrvGetDirectDrawInfo returns TRUE if it succeeds; otherwise, it returns FALSE.

Comments

GDI calls DrvGetDirectDrawInfo and DrvEnableDirectDraw in response to an application’s call to DirectDrawObjectCreate.

When enabling a DirectDraw driver, GDI will call DrvGetDirectDrawInfo twice. The first call determines the size of the video memory heap and the number of FOURCCs that the driver supports. In this call, GDI passes NULL for both pvmList and pdwFourCC, so the driver should initialize and return pdwNumHeaps and pdwNumFourCC only. The second call is made after GDI allocates the required amount of memory for pvmList and pdwFourCC based on the values returned by the first call. In the second call, the driver should initialize and return pdwNumHeaps, pvmList, pdwNumFourCC, and pdwFourCC.

GDI allocates and zero-initializes the DD_HALINFO structure to which pHalInfo points. The driver need only fill in the fields of the DD_HALINFO structure that pertain to it.

See Also

DrvEnableDirectDraw