//Open camera with ID 1
HIDS hCam = 1;
INT nRet = is_InitCamera (&hCam, NULL);
if (nRet != IS_SUCCESS)
{
//Check if new starter firmware is needed
if (nRet == IS_STARTER_FW_UPLOAD_NEEDED)
{
//Calculate time needed for updating the starter firmware
INT nTime;
is_GetDuration (hCam, IS_SE_STARTER_FW_UPLOAD, &nTime);
/*
... e.g. have progress bar displayed in separate thread
*/
//Upload new starter firmware during initialization
nRet = is_InitCamera (&hCam | IS_ALLOW_STARTER_FW_UPLOAD, NULL);
/*
... end progress bar
*/
}
}