IDirectInputDevice2::EnumEffects

The IDirectinputDevice2::EnumEffects method enumerates all of the effects supported by the force feedback system on the device. The enumerated GUIDs may represent predefined effects as well as effects peculiar to the device manufacturer.

HRESULT EnumEffects(
  LPDIENUMEFFECTSCALLBACK lpCallback,  
  LPVOID pvRef,                        
  DWORD dwEffType                      
);
 

Parameters

lpCallback
Address of an application-defined callback function. DirectInput provides the prototype function DIEnumEffectsProc.
pvRef
A 32-bit application-defined value to be passed to the callback function. This parameter may be any 32-bit value; it is declared as LPVOID for convenience.
dwEffType
Effect type filter. Use one of the DIEFT_* values to indicate the effect type to be enumerated, or DIEFT_ALL to enumerate all effect types. For a list of these values, see DIEFFECTINFO.

Return Values

If the method succeeds, the return value is DI_OK.

If the method fails, the return value may be one of the following error values:

DIERR_INVALIDPARAM
DIERR_NOTINITIALIZED

If the callback stops the enumeration prematurely, the enumeration is considered to have succeeded.

Remarks

An application can use the dwEffType member of the DIEFFECTINFO structure to obtain general information about the effect, such as its type and which envelope and condition parameters are supported by the effect.

In order to exploit an effect to its fullest, you must contact the device manufacturer to obtain information on the semantics of the effect and its effect-specific parameters.

QuickInfo

  Windows NT: Use version 5.0 or later.
  Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in dinput.h.
  Import Library: Use dinput.lib.