Platform SDK: DirectX

DirectX7.CreateEvent

The DirectX7.CreateEvent method returns a handle to the event object which is implemented in the form.

object.CreateEvent(event As DirectXEvent) As Long

Parameters

object
Object expression that resolves to a DirectX7 object.
event
The DirectXEvent object implemented in a form.

Return Values

If the method succeeds, a handle to the created event is returned.

Error Codes

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

Remarks

The DirectXEvent object must be implemented by the form in order to receive notifications from DirectX. Generated event handles are used in notification methods of DirectSound, DirectMusic, DirectPlay and DirectInput.

DirectX automatically sets the event object to signaled when an appropriate event occurs. The DirectX7.SetEvent method can also be used to manually set the event. This might be done to test the event-handling code.

All created events must be explicitly destroyed by the creating application with a call to DirectX7.DestroyEvent. Failure to comply with the requirements can result in undefined behavior.

See Also

DirectX7.SetEvent; DirectX7.DestroyEvent; DirectSoundBuffer.SetNotificationPositions; DirectSoundCaptureBuffer.SetNotificationPositions; DirectInputDevice.SetEventNotification; DirectPlayLobby3.SetLobbyMessageEvent; DirectMusicPerformance.SetNotificationHandle