The DirectX 9 SDK has two C++ samples for Force-Feedback, FFConst and ReadFFE. They are located in the Samples/C++/DirectInput directory of the SDK. There is also a Force-Feedback effects editor, Bin/DXUtils/fedit.exe.