Share via


IDirectInputDevice8::EnumEffectsInFile Method

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

Syntax

HRESULT EnumEffectsInFile(
         LPCSTR lpszFileName,
         LPENUMEFFECTSINFILECALLBACK pec,
         LPVOID pvRef,
         DWORD dwFlags
)

Parameters

  • lpszFileName
    Name of the RIFF file.
  • pec
    Address of an application-defined callback function. The declaration of this function must conform to that of the DIEnumEffectsInFileCallback prototype.
  • pvRef
    Application-defined value to be passed to the callback function. This parameter can be any 32-bit type.
  • dwFlags
    Can be DIFEF_DEFAULT ( = 0) or one or both of the following values:
    • DIFEF_INCLUDENONSTANDARD
      Include effect types that are not defined by DirectInput.
    • DIFEF_MODIFYIFNEEDED
      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_INVALIDPARAM DIERR_NOTINITIALIZED

Remarks

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

Requirements

Header: Declared in dinput.h.

See Also

IDirectInputDevice8::WriteEffectToFile
Loading Effects from a File