DirectX SDK

DirectInputDevice.SetEventNotification

The DirectInputDevice.SetEventNotification method 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)

Parameters

object
Object expression that resolves to a DirectInputDevice 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 Events, DirectXEvent