The DIDEVICEOBJECTINSTANCE structure contains information about a device object instance. This structure is used with the IDirectInputDevice::EnumObjects method to provide the DIEnumDeviceObjectsProc callback function with information about a particular object associated with a device, like an axis or button. It is also used with the IDirectInputDevice::GetObjectInfo method to retrieve information about a device object.
typedef struct {
DWORD dwSize;
GUID guidType;
DWORD dwOfs;
DWORD dwType;
DWORD dwFlags;
TCHAR tszName[MAX_PATH];
DWORD dwFFMaxForce;
DWORD dwFFForceResolution;
WORD wCollectionNumber;
WORD wDesignatorIndex;
WORD wUsagePage;
WORD wUsage;
DWORD dwDimension;
WORD wExponent;
WORD wReserved;
} DIDEVICEOBJECTINSTANCE, *LPDIDEVICEOBJECTINSTANCE;
typedef const DIDEVICEOBJECTINSTANCE *LPCDIDEVICEOBJECTINSTANCE;
GUID_XAxis | |
The horizontal axis. For example, it may represent the left-right motion of a mouse. | |
GUID_YAxis | |
The vertical axis. For example, it may represent the forward-backward motion of a mouse. | |
GUID_ZAxis | |
The z-axis. For example, it may represent rotation of the wheel on a mouse, or movement of a throttle control on a joystick. | |
GUID_RxAxis | |
Rotation around the x-axis. | |
GUID_RyAxis | |
Rotation around the y-axis. | |
GUID_RzAxis | |
Rotation around the z-axis (often a rudder control). | |
GUID_Slider | |
A slider axis. | |
GUID_Button | |
A button on a mouse. | |
GUID_Key | |
A key on a keyboard. | |
GUID_POV | |
A point-of-view indicator or "hat". | |
GUID_Unknown | |
Unknown. |
Other object types may be defined in the future.
DIDOI_ASPECTACCEL | |
The object reports acceleration information. | |
DIDOI_ASPECTFORCE | |
The object reports force information. | |
DIDOI_ASPECTMASK | |
The bits that are used to report aspect information. An object can represent at most one aspect. | |
DIDOI_ASPECTPOSITION | |
The object reports position information. | |
DIDOI_ASPECTVELOCITY | |
The object reports velocity information. | |
DIDOI_FFACTUATOR | |
The object can have force feedback effects applied to it. | |
DIDOI_FFEFFECTTRIGGER | |
The object can trigger playback of force feedback effects. | |
DIDOI_POLLED | |
The object does not return data until the IDirectInputDevice2::Poll method is called. |
Applications can use the wUsagePage and wUsage members to obtain additional information about how the object was designed to be used. For example, if wUsagePage has the value 0x02 (vehicle controls) and wUsage has the value 0xB9 (elevator trim), then the object was designed to be the elevator trim control on a flightstick. A flight simulator application can use this information to provide more reasonable defaults for objects on the device. HID usage codes are determined by the USB standards committee.
Windows NT: Use version 5.0 or later.
Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Header: Declared in dinput.h.