Microsoft DirectX 8.0 (C++) |
An input-only Microsoft® DirectInput® implementation consists of the DirectInput object, which supports the IDirectInput8 COM interface, and a DirectInputDevice object for each input device that provides data. Each DirectInputDevice object in turn has device objects, which are individual controls or switches such as keys, buttons, or axes. Device objects are also called device object instances.
Each DirectInputDevice object represents one input device, such as a mouse, keyboard, or joystick. In the DirectInput API, the word joystick means any type of input device other than a mouse or keyboard. A piece of hardware that is really a combination of different types of input devices, such as a keyboard with a touchpad, can be represented by two or more DirectInputDevice objects. A force-feedback device is represented by a single joystick object that handles both input and output.
DirectInputDevice objects instantiate the IDirectInputDevice8 interface. The application ascertains the number and type of device objects available by using the IDirectInputDevice8::EnumObjects method. Individual device objects are not encapsulated as code objects, but are described in DIDEVICEOBJECTINSTANCE structures.
Force-feedback effects are represented by the IDirectInputEffect interface. Methods of this interface are used to create, modify, start, and stop effects.
All DirectInput interfaces are available in ANSI and Unicode versions. If "UNICODE" is defined during compilation, the Unicode versions are used.