
Frame Grabber SDK (Windows-C) Developer Guide
3.8.2 MV_FG_RegisterEventCallBack
Register the callback function for events.
API Definition
int MV_FG_RegisterEventCallBack(
PORTHANDLE
hPort,
const char
*strEventName,
MV_FG_EventCallBack
cbEvent,
void
*pUser
);
Parameters
hPort
[IN] Handle of the object to which the parameter belongs; the object can be a frame grabber, device,
or stream channel.
strEventName
[IN] Event name.
cbEvent
[IN] Events callback function.
void (__stdcall *MV_FG_EventCallBack)(
MV_FG_EVENT_INFO
*pstEventInfo,
void
*pUser
)
pstEventInfo
[IN] Events information, see MV_FG_EVENT_INFO for details.
pUser
[IN] User-defined data.
pUser
[IN] User-defined data.
Return Value
Return MV_FG_SUCCESS on success, and return Error Code on failure.
Remarks
● Processing time-consuming operations in the callback function will block the access to the
subsequent events information.
● This API is available for the event callback of frame grabbers, devices, and stream channels. The
type of registered callback function varies according to the handle type.Now the frame grabber
offline event is not supported. After upgrading the frame grabber, you need to restart the PC before
use.
36





















































































































































