Frame Grabber SDK (Windows-C) Developer Guide
{
printf("Flush Buffer Queue error, %#x\n", nRet);
}
// Release the registered buffer.
for (unsigned int i = 0; i < BUFFER_NUMBER; i++)
{
if (NULL != hBuffer[i])
{
nRet = MV_FG_RevokeBuffer(hStream, hBuffer[i], NULL, NULL);
if (MV_FG_SUCCESS != nRet)
{
printf("Revoke Buffer failed, %#x\n", nRet);
}
hBuffer[i] = NULL;
}
if (NULL != pBuffer[i])
{
free(pBuffer[i]);
pBuffer[i] = NULL;
}
}
// Close the streaming channel.
nRet = MV_FG_CloseStream(hStream);
if (MV_FG_SUCCESS != nRet)
{
printf("Close Stream error, %#x\n", nRet);
}
hStream = NULL;
}
// Close the device.
if (NULL != hDevice)
{
nRet = MV_FG_CloseDevice(hDevice);
if (MV_FG_SUCCESS != nRet)
{
printf("Close device error, %#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 error, %#x\n", nRet);
138
    "