Microsoft DirectX 8.1 (C++) |
Sends a command to the device's force-feedback system.
HRESULT SendForceFeedbackCommand( DWORD dwFlags );
While the device is paused, new effects cannot be started, and existing ones cannot be modified. Doing so can cause the subsequent DISFFC_CONTINUE command to fail to perform properly.
To abandon a pause and stop all effects, use the DISFFC_STOPALL or DISFCC_RESET commands.
This command is equivalent to calling the IDirectInputEffect::Stop method for each effect playing.
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_INPUTLOST |
DIERR_INVALIDPARAM |
DIERR_NOTEXCLUSIVEACQUIRED |
DIERR_NOTINITIALIZED |
DIERR_UNSUPPORTED |
The device must be acquired at the exclusive cooperative level for this method to succeed.
Note When calling GetForceFeedbackState, it is possible for the state of the device returned not to match the expected state. This might happen if commands recently sent by SendForceFeedbackCommand are still pending. Wait a short period of time and then check the device state again.
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.