Microsoft DirectX 8.1 (Visual Basic)

DirectInput8.GetDeviceStatus

Determines whether a device is attached to the system.

object.GetDeviceStatus(guid As String) As Boolean

Parts

object
Resolves to a DirectInput8 object.
guid
The instance GUID for the desired input device. The GUID is retrieved by using the DirectInputDeviceInstance8.GetGuidInstance method on the object returned by DirectInputEnumDevices8.GetItem method, or it can be one of the following strings:
GUID_SysKeyboard
The default system keyboard.
GUID_SysMouse
The default system mouse.

Return Values

Returns True if the device is attached, and False otherwise.

Error Codes

If the method fails, an error is raised and Err.Number may be one of the following error codes.

DIERR_GENERIC
DIERR_INVALIDPARAM

See Also

DirectInput8, Using GUIDs