Platform SDK: DirectX |
Applications use the methods of the IDirectInputDevice7 interface to gain and release access to DirectInput devices, manage device properties and information, set behavior, perform initialization, create and play force-feedback effects, and invoke a device's control panel.
The IDirectInputDevice7 interface is obtained by using the IDirectInput7::CreateDeviceEx method. For an example, see Creating a DirectInput Device.
IDirectInputDevice7 supersedes the IDirectInputDevice and IDirectInputDevice2 interfaces used in previous versions of DirectX.
The methods of the IDirectInputDevice7 interface can be organized into the following groups.
Accessing input devices | Acquire |
Unacquire | |
Device information | GetCapabilities |
GetDeviceData | |
GetDeviceInfo | |
GetDeviceState | |
Poll | |
SetDataFormat | |
SetEventNotification | |
Device objects | EnumObjects |
GetObjectInfo | |
Device properties | GetProperty |
SetCooperativeLevel | |
SetProperty | |
Force feedback | CreateEffect |
EnumCreatedEffectObjects | |
EnumEffects | |
EnumEffectsInFile | |
Escape | |
GetEffectInfo | |
GetForceFeedbackState | |
SendForceFeedbackCommand | |
WriteEffectToFile | |
Miscellaneous | Initialize |
RunControlPanel | |
SendDeviceData |
The IDirectInputDevice7 interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:
IUnknown | AddRef |
QueryInterface | |
Release |
The LPDIRECTINPUTDEVICE7 type is defined as a pointer to the IDirectInputDevice interface:
typedef struct IDirectInputDevice7 *LPDIRECTINPUTDEVICE7;
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dinput.h.
Import Library: Use dinput.lib.