Platform SDK: DirectX

DIDEVICEOBJECTDATA

The DIDEVICEOBJECTDATA type contains raw buffered device information. This type is used with the DirectInputDevice.GetDeviceData method.

Type DIDEVICEOBJECTDATA
    lData As Long
    lOfs As Long
    lSequence As Long
    lTimeStamp As Long
End Type

Members

lData
Data obtained from the device.

For axis input, if the device is in relative axis mode, then the relative axis motion is reported. If the device is in absolute axis mode, then the absolute axis coordinate is reported.

For button input, only the low byte of lData is significant. The high bit of the low byte is set if the button went down; it is clear if the button went up.

lOfs
Offset into the current data format of the object whose data is being reported—that is, the location where the data would have been stored if it had been obtained by a call to the DirectInputDevice.GetDeviceStateX method where X refers to the specific device, for instance GetDeviceStateMouse. If the device is accessed as a keyboard, you can determine which key generated the event by comparing this value with the members of the CONST_DIKEYFLAGS enumeration. For the mouse and joystick, the value in lOfs is equivalent to the byte offset of the button or axis within the DIMOUSESTATE, DIJOYSTATE, or DIJOYSTATE2 type (depending on the data format that was established by using DirectInputDevice.SetCommonDataFormat.) Constants for these offsets are contained in the CONST_DIMOUSEOFS and CONST_DIJOYSTICKOFS enumerations. If a custom data format has been set by using DirectInputDevice.SetDataFormat, then lOfs is the offset of the device object's place in the custom data format.
lSequence
DirectInput sequence number for this event. All input events are assigned an increasing sequence number. This allows events from different devices to be sorted chronologically. Since this value can wrap around, care must be taken when comparing two sequence numbers.
lTimeStamp
System time at which the input event was generated, in milliseconds. This value wraps around approximately every 50 days.