DIDEVICEINSTANCE
The DIDEVICEINSTANCE structure contains information about an instance of a DirectInput device. This structure is used with the IDirectInput::EnumDevices and IDirectInputDevice::GetDeviceInfo methods.
typedef struct DIDEVICEINSTANCE {
DWORD dwSize;
GUID guidInstance;
GUID guidProduct;
DWORD dwDevType;
TCHAR tszInstanceName[MAX_PATH];
TCHAR tszProductName[MAX_PATH];
GUID guidFFDriver;
WORD wUsagePage;
WORD wUsage;
} DIDEVICEINSTANCE, *LPDIDEVICEINSTANCE;
typedef const DIDEVICEINSTANCE *LPCDIDEVICEINSTANCE;
Members
- dwSize
- Size of this structure, in bytes. This member must be initialized before the structure is used.
- guidInstance
- Unique identifier for the instance of the device. An application may save the instance GUID into a configuration file and use it at a later time. Instance GUIDs are specific to a particular computer. An instance GUID obtained from one computer is unrelated to instance GUIDs on another.
- guidProduct
- Unique identifier for the product. This identifier is established by the manufacturer of the device.
- dwDevType
- Device type specifier. The least-significant byte of the device type description code specifies the device type. The next-significant byte specifies the device subtype. This value can be one of the following types combined with their respective subtypes and optionally with DIDEVTYPE_HID, which specifies a Human Interface Device.
- Device Types
- DIDEVTYPE_MOUSE
- A mouse or mouse-like device (such as a trackball).
- DIDEVTYPE_KEYBOARD
- A keyboard or keyboard-like device.
- DIDEVTYPE_JOYSTICK
- A joystick or similar device, such as a steering wheel.
- DIDEVTYPE_DEVICE
- A device that does not fall into the previous categories.
- Mouse subtypes
- DIDEVTYPEMOUSE_UNKNOWN
- The subtype could not be determined.
- DIDEVTYPEMOUSE_TRADITIONAL
- The device is a traditional mouse.
- DIDEVTYPEMOUSE_FINGERSTICK
- The device is a fingerstick.
- DIDEVTYPEMOUSE_TOUCHPAD
- The device is a touchpad.
- DIDEVTYPEMOUSE_TRACKBALL
- The device is a trackball.
- Keyboard subtypes
- DIDEVTYPEKEYBOARD_UNKNOWN
- The subtype could not be determined.
- DIDEVTYPEKEYBOARD_PCXT
- IBM PC/XT 83-key keyboard.
- DIDEVTYPEKEYBOARD_OLIVETTI
- Olivetti 102-key keyboard.
- DIDEVTYPEKEYBOARD_PCAT
- IBM PC/AT 84-key keyboard.
- DIDEVTYPEKEYBOARD_PCENH
- IBM PC Enhanced 101/102-key or Microsoft Natural® keyboard.
- DIDEVTYPEKEYBOARD_NOKIA1050
- Nokia 1050 keyboard.
- DIDEVTYPEKEYBOARD_NOKIA9140
- Nokia 9140 keyboard.
- DIDEVTYPEKEYBOARD_NEC98
- Japanese NEC PC98 keyboard.
- DIDEVTYPEKEYBOARD_NEC98LAPTOP
- Japanese NEC PC98 laptop keyboard.
- DIDEVTYPEKEYBOARD_NEC98106
- Japanese NEC PC98 106-key keyboard.
- DIDEVTYPEKEYBOARD_JAPAN106
- Japanese 106-key keyboard.
- DIDEVTYPEKEYBOARD_JAPANAX
- Japanese AX keyboard.
- DIDEVTYPEKEYBOARD_J3100
- Japanese J3100 keyboard.
- Joystick Subtypes
- DIDEVTYPEJOYSTICK_UNKNOWN
- The subtype could not be determined.
- DIDEVTYPEJOYSTICK_TRADITIONAL
- A traditional joystick.
- DIDEVTYPEJOYSTICK_FLIGHTSTICK
- A joystick optimized for flight simulation.
- DIDEVTYPEJOYSTICK_GAMEPAD
- A device whose primary purpose is to provide button input.
- DIDEVTYPEJOYSTICK_RUDDER
- A device for yaw control.
- DIDEVTYPEJOYSTICK_WHEEL
- A steering wheel.
- DIDEVTYPEJOYSTICK_HEADTRACKER
- A device that tracks the movement of the user's head.
Flags in the High Word
- DIDEVTYPE_HID
- The device uses the Human Interface Device (HID) protocol.
- tszInstanceName[MAX_PATH]
- Friendly name for the instance. For example, "Joystick 1."
- tszProductName[MAX_PATH]
- Friendly name for the product.
- guidFFDriver
- Unique identifier for the driver being used for force feedback. This identifier is established by the manufacturer of the driver.
- wUsagePage
- If the device is a HID device, then this member contains the HID usage page code.
- wUsage
- If the device is a HID, then this member contains the HID usage code.
Remarks
For compatibility with previous versions of DirectX, a DIDEVICEINSTANCE_DX3 structure is also defined, containing only the first six members of the DIDEVICEINSTANCE structure.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dinput.h.