?/TD>
Microsoft DirectX 9.0

IDirectInputDevice8::EnumEffects Method


Enumerates all the effects supported by the force-feedback system on the device. The enumerated globally unique identifiers (GUIDs) can represent predefined effects, as well as effects peculiar to the device manufacturer.

Syntax

HRESULT EnumEffects(      

    LPDIENUMEFFECTSCALLBACK lpCallback,     LPVOID pvRef,     DWORD dwEffType );

Parameters

lpCallback
Address of an application-defined callback function. The declaration of this function must conform to that of the DIEnumEffectsCallback prototype.
pvRef
A 32-bit application-defined value to be passed to the callback function. This parameter can be any 32-bit type; 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 Value

If the method succeeds, the return value is DI_OK.

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

DIERR_INVALIDPARAMAn invalid parameter was passed to the returning function, or the object was not in a state that permitted the function to be called. This value is equal to the E_INVALIDARG standard Component Object Model (COM) return value.
DIERR_NOTINITIALIZEDThe object has not been initialized.


Remarks

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

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.

To exploit an effect to its fullest, contact the device manufacturer to obtain information about the semantics of the effect and its effect-specific parameters.



© 2002 Microsoft Corporation. All rights reserved.