With Matrox Clarity UHD, MIL provides autodetect DCFs and specific resolution DCFs. To use an autodetect DCF when allocating a digitizer, a camera must be connected to the specified acquisition path (M_DEVn). To use a specific resolution DCF, a camera does not necessarily need to be connected before the allocation.
You can hook a function to the event that occurs when a camera is connected or disconnected from the board using MsysHookFunction() with the M_CAMERA_PRESENT hook type. In the hook-handler function, you can inquire whether the event occurred upon the connection or disconnection of the camera using MsysGetHookInfo() with M_CAMERA_PRESENT; you can establish to which acquisition path the camera was connected or disconnected from using MsysGetHookInfo() with M_NUMBER. Based on this information, you can allocate or free the digitizer for the camera in the hook handler function.
The following example demonstrates how to use automatic camera detection with Matrox Clarity UHD: MultiCameraDisplay.cpp. To run the example, you can use Example Launcher.