HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, "");
if ( hEvent != NULL )
{
is_InitEvent(hCam, m_hEvent, IS_SET_EVENT_FRAME);
is_EnableEvent(hCam, IS_SET_EVENT_FRAME);
is_SetExternalTrigger(hCam, IS_SET_TRIGGER_HI_LO);
is_FreezeVideo(hCam, IS_DONT_WAIT);
if (WaitForSingleObject(m_hEvent, 1000) != WAIT_OBJECT_0)
{
// No trigger has been received, so force image capture
is_ForceTrigger(hCam);
}
is_DisableEvent(hCam, IS_SET_EVENT_FRAME);
is_ExitEvent(hCam, IS_SET_EVENT_FRAME);
}