DirectX SDK

IDirectInputDevice7::WriteEffectToFile

The IDirectInputDevice7::WriteEffectToFile method saves information about one or more force-feedback effects to a file that can be read by using IDirectInputDevice7::EnumEffectsInFile. This method is chiefly of interest to those wanting to write their own force-authoring applications.

HRESULT WriteEffectToFile(
  LPCSTR lpszFileName, 
  DWORD dwEntries,
  LPCDIFILEEFFECT rgDiFileEft, 
  DWORD dwFlags
);

Parameters

lpszFileName
Name of the RIFF file.
dwEntries
Number of structures in the rgDiFileEft array.
rgDiFileEft
Array of DIFILEEFFECT structures.
dwFlags
Flags which control how the effect should be written. Can be DIFEF_DEFAULT (= 0) or the following value:
DIFEF_INCLUDENONSTANDARD
Includes effects that are not defined by DirectInput. If this flag is not specified, only effects with GUIDs defined in Dinput.h, such as GUID_ConstantForce, are written.

Return Values

If the method succeeds, it returns DI_OK.

If it fails, the return value can be DIERR_INVALIDPARAM.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dinput.h.
  Import Library: Use dinput.lib.

See Also

IDirectInputDevice7::EnumEffectsInFile