
Frame Grabber SDK (Windows-C) Developer Guide
hStream = NULL;
}
// Close the device.
if (NULL != hDevice)
{
nRet = MV_FG_CloseDevice(hDevice);
if (MV_FG_SUCCESS != nRet)
{
printf("Close device failed! %#x\n", nRet);
}
hDevice = NULL;
}
// Close the frame grabber.
if (NULL != hInterface)
{
nRet = MV_FG_CloseInterface(hInterface);
if (MV_FG_SUCCESS != nRet)
{
printf("Close interface failed! %#x\n", nRet);
}
hInterface = NULL;
}
printf("Press any key to exit.\n");
WaitForKeyPress();
return 0;
}
A.5 Get Chunk Data
The following sample codes show how to enable and configure chunk data and get the chunk data
information.
#include <stdio.h>
#include <Windows.h>
#include <process.h>
#include <conio.h>
#include "MVFGControl.h"
#define BUFFER_NUMBER
3
#define CHUNK_ID_TIMESTAMP_LITTLE 0xa5a50101
#define CHUNK_ID_EXPOSURE_LITTLE 0xa5a50103
// Number of requested buffers
// Timestamp
// Exposure
// Wait for key press.
void WaitForKeyPress(void)
{
while(!_kbhit())
{
107





















































































































































