
Frame Grabber SDK (Windows-C) Developer Guide
{
nRet);
}
printf("MV_FG_SetEnumValueByString EventCategory %s error, %#x\n", "StreamEvent",
break;
nRet);
// Set the event channel (Channel0-Channel3)
nRet = MV_FG_SetEnumValueByString(hInterface, "ChannelSelector", "Channel0");
if (MV_FG_SUCCESS != nRet)
{
printf("MV_FG_SetEnumValueByString ChannelSelector %s error, %#x\n", "Channel0",
break;
}
// Set the specific event (you can set other specific events under the camera node
EventSelector)
nRet = MV_FG_SetEnumValueByString(hInterface, "EventSelector",
"ReceiveImageFrameStart0");
if (MV_FG_SUCCESS != nRet)
{
printf("MV_FG_SetEnumValueByString EventSelector %s error, %#x\n",
"ReceiveImageFrameStart0", nRet);
break;
}
// Enable the event notification
nRet = MV_FG_SetEnumValueByString(hInterface, "EventNotification", "On");
if (MV_FG_SUCCESS != nRet)
{
printf("MV_FG_SetEnumValueByString EventNotification %s error, %#x\n", "On", nRet);
break;
}
// Enumerate cameras of the frame grabber.
nRet = MV_FG_UpdateDeviceList(hInterface, &bChanged);
if (MV_FG_SUCCESS != nRet)
{
printf("Update Device list error, %#x\n", nRet);
break;
}
// Get and print the device information.
unsigned int nDeviceNumber = 0;
nRet = MV_FG_GetNumDevices(hInterface, &nDeviceNumber);
if (MV_FG_SUCCESS != nRet || 0 == nDeviceNumber)
{
printf("No devices found, %#x\n", nRet);
break;
}
134





















































































































































