Platform SDK: DirectX

DDEnumCallbackEx

The DDEnumCallbackEx function is an application-defined callback function for the DirectDrawEnumerateEx function.

BOOL WINAPI DDEnumCallbackEx(
  GUID FAR *lpGUID,    
  LPSTR     lpDriverDescription, 
  LPSTR     lpDriverName,        
  LPVOID    lpContext,           
  HMONITOR  hm        
);

Parameters

lpGUID
Address of the unique identifier of the DirectDraw object.
lpDriverDescription
Address of a string that contains the driver description.
lpDriverName
Address of a string that contains the driver name.
lpContext
Address of an application-defined structure to be passed to the callback function each time that the function is called.
hm
Handle of the monitor associated with the enumerated DirectDraw object. This parameter is NULL when the enumerated DirectDraw object is for the primary device, a nondisplay device (such as a 3-D accelerator with no 2-D capabilities), or devices not attached to the desktop.

Return Values

The callback function returns nonzero to continue the enumeration.

It returns 0 to stop the enumeration.

Remarks

After the DirectDrawEnumerateEx function completes, the pointer to the GUID is no longer valid. You must save a copy of the GUID structure itself, not the pointer, or the DirectDrawCreate function fails.

You can use the LPDDENUMCALLBACKEX data type to declare a variable that can contain a pointer to this callback function.

If UNICODE is defined, the string values are returned as type LPWSTR, rather than LPSTR.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 98.
  Header: Declared in ddraw.h.
  Import Library: User-defined.

See Also

Enumerating Devices on MultiMon Systems, Multiple-Monitor Systems