Home > C: Programming > AVI Function Descriptions > History back  Previous chapter  Next chapter  Print  

isavi_InitEvent

uEye Camera Manual Version 3.80

isavi_InitEvent

Windows_Logo

Linux_Logo

USB 2.0

GigE

-

Syntax

INT isavi_InitEvent (INT nAviID, INT which)

Description

isavi_InitEvent() creates the specified event. This includes registering the event object in the uEye AVI interface and creating an event handler. Before you can use a new event, you must enable it by calling isavi_EnableEvent().

Input Parameters

nAviID

Instance ID set by the isavi_InitAVI() function.

which

Name of the event to be created.

IS_AVI_SET_EVENT_FRAME_SAVED

A new frame was saved to the AVI file.

Return Values

IS_AVI_NO_ERR

Function executed successfully

IS_AVI_ERR_INVALID_ID

The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI().

IS_AVI_ERR_EVENT_FAILED

The event could not be initialized. The Windows SetEvent function failed.

IS_AVI_ERR_PARAMETER

An invalid event was specified for the which parameter.

Related Functions

isavi_ExitEvent()
isavi_EnableEvent()
isavi_DisableEvent()

 

Code Sample

Create and enable an event object for the "Frame saved" event:


HANDLE hEvent = CreateEvent( NULL, TRUE, FALSE, "" );

if ( hEvent != NULL )

{

isavi_InitEvent( AviDest, hEvent, IS_AVI_SET_EVENT_FRAME_SAVED );

isavi_EnableEvent( AviDest, IS_AVI_SET_EVENT_FRAME_SAVED );

 

if ( WaitForSingleObject( hEvent, 1000 ) == WAIT_OBJECT_0 )

{

//Frame was captured successfully...

}

isavi_DisableEvent( AviDest, IS_AVI_SET_EVENT_FRAME_SAVED );

isavi_ExitEvent( AviDest, IS_AVI_SET_EVENT_FRAME_SAVED );  

}


Suggestion for improvement? Send us your short Feedback on this chapter. Thank you very much!


© 2010 IDS Imaging Development Systems GmbH
http://www.ids-imaging.com