Microsoft DirectX 8.1 (Visual Basic) |
Creates a force-feedback effect whose parameters are stored in a file. If the device is currently acquired at the exclusive cooperative level, the effect is also downloaded.
object.CreateEffectFromFile( _ filename As String, _ flags As Long, _ effectName As String _ ) As DirectInputEffect
Returns a DirectInputEffect object.
If the method fails, an error is raised and Err.Number may be one of the following error codes.
DIERR_DEVICEFULL |
DIERR_DEVICENOTREG |
DIERR_INVALIDPARAM |
DIERR_NOTINITIALIZED |
If no error is raised, the effect was created but not necessarily downloaded. In order for it to be downloaded, the device must be acquired in exclusive mode.
The file specified in the filename parameter must be in the format used by the Force Editor (Fedit.exe) application supplied with the Microsoft® DirectInput® SDK.
DirectInputEffect.Download, DirectInputDevice8.WriteEffectToFile