Microsoft DirectX 8.1 (C++)

IDirectInputDevice8::WriteEffectToFile

Saves information about one or more force-feedback effects to a file that can be read by using IDirectInputDevice8::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. This can be DIFEF_DEFAULT (= 0) or the following value:
DIFEF_INCLUDENONSTANDARD
Includes effects that are not defined by Microsoft® 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/XP: Requires Windows® 2000.
  Windows 98/Me: Requires Windows 98 or later. Available as a redistributable for Windows 98.
  Header: Declared in Dinput.h.

See Also

IDirectInputDevice8::EnumEffectsInFile