Machine Vision Camera SDK (C) Developer Guide
Remarks
This API is supported only by CameraLink device.
Example
The following sample code is for reference only.
#include "MvCameraControl.h"
#include <stdio.h>
#include <Windows.h>
#include <conio.h>
//Wait for key input
void WaitForKeyPress(void)
{
while(!_kbhit())
{
Sleep(10);
}
_getch();
}
int main()
{
int nRet = MV_OK;
void* handle = NULL;
bool bDevConnected = false; //Whether device is connected
do
{
// Enumerate device
MV_CC_DEVICE_INFO_LIST stDeviceList;
memset(&stDeviceList, 0, sizeof(MV_CC_DEVICE_INFO_LIST));
nRet = MV_CC_EnumDevices(MV_CAMERALINK_DEVICE, &stDeviceList);
if (MV_OK != nRet)
{
printf("Enum Devices fail! nRet [0x%x]\n", nRet);
break;
}
if (m_stDevList.nDeviceNum == 0)
{
printf("no camera found!\n");
return 0;
}
// Select device and create handle
nRet = MV_CC_CreateHandle(&handle, stDeviceList.pDeviceInfo[0]);
if (MV_OK != nRet)
{
printf("Create Handle fail! nRet [0x%x]\n", nRet);
break;
}
/*******************The following content is valid only for CameraLink
82
    "