DirectX SDK |
The DirectInputDeviceObjectInstance.GetType method retrieves the type and instance identifier of the object.
object.GetType() As Long
Device type that describes the object. It is a combination of CONST_DIDFTFLAGS flags that describe the object type (axis, button, and so forth) and contains the object instance number in the middle 16 bits.
If the method fails, an error is raised and Err.Number will be set.
To extract the object instance ID, use the following operation:
Dim ObjID as Long ObjID = (diObj.GetType And &HFFFF00) \ 256