Machine Vision Camera SDK (C) Developer Guide
Parameters
handle
[IN] Device handle, which is returned by MV_CC_CreateHandle or
MV_CC_CreateHandleWithoutLog .
fEventCallBack
Event callback function, see the details below:
void(__stdcall* cbEvent)(
unsigned int nExternalEventId,
void
*pUser
);
nExternalEventId
[OUT] External output event ID, see enumeration MV_GIGE_EVENT for details.
pUser
[OUT] User data
Return Value
Return MV_OK(0) on success, and return Error Code on failure.
Remarks
Set event callback through this interface. Get acquisition and exposure information in the
callback function.
This API is not recommended, the API MV_CC_RegisterEventCallBackEx is suggested.
This API is supported by CameraLink device only for device offline event.
Example
The following sample code is for reference only.
#include "MvCameraControl.h"
//Exception callback function
void __stdcall EventCallBack(unsigned int nExternalEventId, void* pUser)
{
switch(nUserDefinedId)
{
case MV_EVENT_ExposureEnd:
printf("ExposureEnd!\n");
break;
case MV_EVENT_FrameStartOvertrigger:
printf("FrameStartOvertrigger!\n");
break;
case MV_EVENT_AcquisitionStartOvertrigger:
printf("AcquisitionStartOvertrigger!\n");
break;
case MV_EVENT_FrameStart:
155
    "