
Machine Vision Camera SDK (C) Developer Guide
printf("Grab using strategy MV_GrabStrategy_LatestImagesOnly
\n");
nRet = MV_CC_SetGrabStrategy(handle,
MV_GrabStrategy_LatestImagesOnly);
if (MV_OK != nRet)
{
printf("Set Grab Strategy fail! nRet [0x%x]\n", nRet);
break;
}
}
break;
case MV_GrabStrategy_LatestImages:
{
printf("Grab using strategy MV_GrabStrategy_LatestImages\n");
nRet = MV_CC_SetGrabStrategy(handle,
MV_GrabStrategy_LatestImages);
if (MV_OK != nRet)
{
printf("Set Grab Strategy fail! nRet [0x%x]\n", nRet);
break;
}
//Set output queue size
nRet = MV_CC_SetOutputQueueSize(handle, 2);
if (MV_OK != nRet)
{
printf("Set Output Queue Size fail! nRet [0x%x]\n", nRet);
break;
}
}
break;
case MV_GrabStrategy_UpcomingImage:
{
printf("Grab using strategy MV_GrabStrategy_UpcomingImage\n");
nRet = MV_CC_SetGrabStrategy(handle,
MV_GrabStrategy_UpcomingImage);
if (MV_OK != nRet)
{
printf("Set Grab Strategy fail! nRet [0x%x]\n", nRet);
break;
}
unsigned int nThreadID = 0;
void* hThreadHandle = (void*) _beginthreadex( NULL , 0 ,
UpcomingThread , handle, 0 , &nThreadID );
if (NULL == hThreadHandle)
{
break;
}
}
break;
default:
53



































































































































































































































































































































































































