Platform SDK: DirectX

DirectInputDeviceObjectInstance.GetType

The DirectInputDeviceObjectInstance.GetType method retrieves the type and instance identifier of the object.

object.GetType() As Long

Parameters

object
Object expression that resolves to a DirectInputDeviceObjectInstance object.

Return Values

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.

Error Codes

If the method fails, an error is raised and Err.Number will be set.

Remarks

To extract the object instance ID, use the following operation:

Dim ObjID as Long
ObjID = (diObj.GetType And &HFFFF00) \ 256