Microsoft DirectX 8.1 (Visual Basic)

DIDEVICEOBJECTDATA

Contains raw buffered device information. This type is used with the DirectInputDevice8.GetDeviceData method.

Type DIDEVICEOBJECTDATA
    lData As Long
    lOfs As Long
    lSequence As Long
    lTimeStamp As Long
    lUserData 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 DirectInputDevice8.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 DirectInputDevice8.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 DirectInputDevice8.SetDataFormat, then lOfs is the offset of the device object's place in the custom data format.
lSequence
Microsoft® 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.
lUserData
Application-defined action value assigned to this object in the last call to DirectInputDevice8.SetActionMap. This is the value in the lAppData member of the DIACTION type associated with the object. Ignore this value if you are not using action mapping.

When the typestructure is used with the SendDeviceData method, this member must be zero.