Platform SDK: DirectX

DirectDrawEnumerateEx

The DirectDrawEnumerateEx function enumerates all DirectDraw devices installed on the system. The NULL entry always identifies the primary display device shared with GDI.

HRESULT WINAPI DirectDrawEnumerateEx(
  LPDDENUMCALLBACKEX lpCallback,  
  LPVOID lpContext,            
  DWORD  dwFlags
);

Parameters

lpCallback
Address of a DDEnumCallbackEx function to be called with a description of each enumerated DirectDraw-enabled hardware abstraction layer (HAL).
lpContext
Address of an application-defined value to be passed to the enumeration callback function each time that it is called.
dwFlags
Flags specifying the enumeration scope. This parameter can be 0 or a combination of the following flags. If the value is 0, the function enumerates only the primary display device.
DDENUM_ATTACHEDSECONDARYDEVICES
The function enumerates the primary device and any display devices that are attached to the desktop.
DDENUM_DETACHEDSECONDARYDEVICES
The function enumerates the primary device and any display devices that are not attached to the desktop.
DDENUM_NONDISPLAYDEVICES
The function enumerates the primary device and any nondisplay devices, such as 3-D accelerators that have no 2-D capabilities.

Return Values

If the function succeeds, the return value is DD_OK.

If it fails, the function returns DDERR_INVALIDPARAMS.

Remarks

On systems with multiple monitors, this method enumerates multiple display devices. For more information, see Multiple-Monitor Systems.

For Windows 98, this function is supported in DirectX 5.0 and later; for all other operating systems, DirectX 6.0 is required. Retrieve the address of the DirectDrawEnumerateEx function from the Ddraw.dll dynamic-link library by calling the GetProcAddress Win32 function with the "DirectDrawEnumerateExA" (ANSI) or "DirectDrawEnumerateExW" (Unicode) process name strings. If GetProcAddress fails, the installed version of the operating system does not support multiple monitors. For more information, see Enumerating Devices on MultiMon Systems.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 98.
  Header: Declared in ddraw.h.
  Import Library: Use ddraw.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.