Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

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

Syntax

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

Parameters

lpCallback

[in] Address of a DDEnumCallbackExfunction that will be called with a description of each enumerated DirectDraw-enabled HAL.

lpContext

[in] Address of an application-defined value that will be passed to the enumeration callback function each time it is called.

dwFlags

[in] Flags specifying the enumeration scope. This parameter can be zero or a combination of the following flags. If the value is zero, the function will enumerate only the primary display device.

Flag Description

DDENUM_ATTACHEDSECONDARYDEVICES

Enumerates the primary device and any display devices attached to the desktop.

DDENUM_DETACHEDSECONDARYDEVICES

Enumerates the primary device and any display devices not attached to the desktop.

Return Value

If the function succeeds, the return value is DD_OK.

If the function fails, the return value is DirectDraw Return Values

Remarks

Retrieve the DirectDrawEnumerateExfunction's address from Ddraw.dll by calling the GetProcAddressWin32® function with the DirectDrawEnumerateEx(Unicode) process name strings.

If GetProcAddressfails, the installed version of the OS does not support multiple monitors.

Requirements

Header ddraw.h
Library ddraw.lib
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later