?/TD>
Microsoft DirectX 9.0

DIDEVICEINSTANCE Structure


Describes an instance of a Microsoft?DirectInput?device. This structure is used with the IDirectInput8::EnumDevices, IDirectInput8::EnumDevicesBySemantics, and IDirectInputDevice8::GetDeviceInfo methods.

Syntax

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 can save the instance globally unique identifier (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 also be combined with DIDEVTYPE_HID, which specifies a Human Interface Device (HID).
tszInstanceName
Friendly name for the instance. For example, "Joystick 1."
tszProductName
Friendly name for the product.
guidFFDriver
Unique identifier for the driver being used for force feedback. The driver's manufacturer establishes this identifier.
wUsagePage
If the device is a Human Interface Device (HID), this member contains the HID usage page code.
wUsage
If the device is a Human Interface Device (HID), this member contains the HID usage code.

Remarks

The following device types and subtypes are defined for use in the dwDevType member.

Versions of DirectInput earlier than Microsoft DirectX?8.0 have a somewhat different scheme of device types and subtypes. See the DIDEVTYPExxx defines in Dinput.h.

Structure Information

Headerdinput.h
Minimum operating systems Windows 98


© 2002 Microsoft Corporation. All rights reserved.