Microsoft DirectX 8.1 (Visual Basic)

DirectInput8.GetDIDevices

Enumerates available devices.

object.GetDIDevices( _ 
  deviceType As CONST_DI8DEVICETYPE, _ 
  flags As CONST_DIENUMDEVICESFLAGS) _ 
  As DirectInputEnumDevices8

Parts

object
Resolves to a DirectInput8 object.
deviceType
Value that specifies the type of device to enumerate. If this parameter is 0, all types are enumerated. Otherwise, it is one of the constants of the CONST_DI8DEVICETYPE enumeration representing a class or type of device.
flags
Flag value that specifies the scope of the enumeration. This parameter contains one or more of the constants of the CONST_DIENUMDEVICESFLAGS enumeration.

Return Values

Returns a DirectInputEnumDevices8 object.

Error Codes

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

Remarks

All installed devices can be enumerated, even if they are not present. For example, a joystick may be installed on the system but not currently plugged into the computer.

If a single piece of hardware can function as more than one Microsoft® DirectInput® device type, it will be returned for each device type it supports. For example, a keyboard with a built-in mouse will be enumerated as a keyboard and as a mouse. The product GUID would be the same for each device, however.

See Also

DirectInput8