
Frame Grabber SDK (Windows-C) Developer Guide
DLL_GetDeviceInfo DLLGetDeviceInfo = (DLL_GetDeviceInfo)GetProcAddress(hDll,
"MV_FG_GetDeviceInfo");
for (unsigned int i = 0; i < nDeviceNum; i++)
{
MV_FG_DEVICE_INFO stDeviceInfo = { 0 };
nRet = DLLGetDeviceInfo(hInterface, i, &stDeviceInfo);
if (MV_FG_SUCCESS != nRet)
{
printf("Get info of No.%d device failed! %#x\n", i, nRet);
return false;
}
switch (stDeviceInfo.nDevType)
{
case MV_FG_CXP_DEVICE:
{
printf("[CXP]No.%d Device:
\n\tUserDefinedName: %s\n\tModelName: %s\n\tSerialNumber: %s\n", i,
stDeviceInfo.DevInfo.stCXPDevInfo.chUserDefinedName,
stDeviceInfo.DevInfo.stCXPDevInfo.chModelName,
stDeviceInfo.DevInfo.stCXPDevInfo.chSerialNumber);
break;
}
case MV_FG_GEV_DEVICE:
{
printf("[GEV]No.%d Device:
\n\tUserDefinedName: %s\n\tModelName: %s\n\tSerialNumber: %s\n", i,
stDeviceInfo.DevInfo.stGEVDevInfo.chUserDefinedName,
stDeviceInfo.DevInfo.stGEVDevInfo.chModelName,
stDeviceInfo.DevInfo.stGEVDevInfo.chSerialNumber);
break;
}
case MV_FG_CAMERALINK_DEVICE:
{
printf("[CML]No.%d Device:
\n\tUserDefinedName: %s\n\tModelName: %s\n\tSerialNumber: %s\n", i,
stDeviceInfo.DevInfo.stCMLDevInfo.chUserDefinedName,
stDeviceInfo.DevInfo.stCMLDevInfo.chModelName,
stDeviceInfo.DevInfo.stCMLDevInfo.chSerialNumber);
break;
}
default:
{
printf("Unknown device type.\n");
return false;
}
}
}
124





















































































































































