HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, "");
if (hEvent != NULL)
{
//Enable frame event, start image capture and wait for event:
is_InitEvent(hCam, hEvent, IS_SET_EVENT_FRAME);
is_EnableEvent(hCam, IS_SET_EVENT_FRAME);
is_FreezeVideo(hCam, IS_DONT_WAIT);
if (WaitForSingleObject(hEvent, 1000) == WAIT_OBJECT_0)
{
// Image was captured successfully
is_DisableEvent(hCam, IS_SET_EVENT_FRAME);
is_ExitEvent(hCam, IS_SET_EVENT_FRAME);
}
}