
Frame Grabber SDK (Windows-C) Developer Guide
// Get the buffer information of a frame.
nRet = DLLGetFrameBuffer(pstThreadParam->pUser, &stFrameInfo, TIMEOUT);
if (MV_FG_SUCCESS != nRet)
{
printf("Get frame buffer info failed! %#x\n", nRet);
continue;
}
else
{
printf("FrameNumber:%2I64d%, Width:%d, Height:%d\n", stFrameInfo.nFrameID,
stFrameInfo.nWidth, stFrameInfo.nHeight);
if (nSaveImage < SAVE_IMAGE_NUM)
{
SaveRawImage(++nSaveImage, &stFrameInfo);
}
}
// Insert the buffer back to the input queue.
nRet = DLLReleaseFrameBuffer(pstThreadParam->pUser, &stFrameInfo);
if (MV_FG_SUCCESS != nRet)
{
printf("Release frame buffer failed! %#x\n", nRet);
break;
}
}
// Stop image acquisition.
nRet = DLLStopAcquisition(pstThreadParam->pUser);
if (MV_FG_SUCCESS != nRet)
{
printf("Stop acquisition failed! %#x\n", nRet);
return nRet;
}
}
return MV_FG_SUCCESS;
}
// Print frame grabber information.
bool PrintInterfaceInfo(HINSTANCE hDll, unsigned int nInterfaceNum)
{
int nRet = 0;
DLL_GetInterfaceInfo DLLGetInterfaceInfo = (DLL_GetInterfaceInfo)GetProcAddress(hDll,
"MV_FG_GetInterfaceInfo");
for (unsigned int i = 0; i < nInterfaceNum; i++)
{
MV_FG_INTERFACE_INFO stInterfaceInfo = { 0 };
122





















































































































































