Microsoft DirectX 9.0

IDirectInputDevice8::EnumEffectsInFile Method

Enumerates all the effects in a file created by the Force Editor utility or another application using the same file format.


HRESULT EnumEffectsInFile(      

    LPCSTR lpszFileName,     LPENUMEFFECTSINFILECALLBACK pec,     LPVOID pvRef,     DWORD dwFlags );


Name of the RIFF file.
Address of an application-defined callback function. The declaration of this function must conform to that of the DIEnumEffectsInFileCallback prototype.
Application-defined value to be passed to the callback function. This parameter can be any 32-bit type.
Can be DIFEF_DEFAULT ( = 0) or one or both of the following values:
Include effect types that are not defined by Microsoft?DirectInput?
Instruct DirectInput to modify the authored effect, if necessary, so that it plays on the current device. For example, by default, an effect authored for two axes does not play on a single-axis device. Setting this flag allows the effect to play on a single axis. The parameters are modified in the DIEFFECT structure pointed to by the lpDiEffect member of the DIFILEEFFECT structure passed to the callback.

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.


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

See Also

IDirectInputDevice8::WriteEffectToFile, Loading Effects from a File

© 2002 Microsoft Corporation. All rights reserved.