Microsoft DirectX 8.1 (Visual Basic)

DirectInputDevice8.SetEventNotification

Sets the event notification status. This method specifies an event that is to be set when the device state changes. It is also used to turn off event notification.

object.SetEventNotification(hEvent As Long)

Parts

object
Resolves to a DirectInputDevice8 object.
hEvent
Handle to the event that is to be set when the device state changes, or 0 to disable notification.

Error Codes

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

DIERR_ACQUIRED
DIERR_HANDLEEXISTS
DIERR_INVALIDPARAM

Remarks

A device state change is defined as any of the following:

You must call this method with the hEvent parameter set to 0 before destroying the event.

The event notification handle cannot be changed while the device is acquired.

See Also

Polling and Event Notification, DirectXEvent8