© 2016 Thorlabs Scientific Imaging
4 Programming (SDK)
229
Return values
Not enough memory allocated for the
UC480_CAMERA_LIST structure
An attempt to initialize or select the camera
failed (no camera connected or initialization
error).
One of the submitted parameters is outside the
valid range or is not supported for this sensor or
is not available in this mode.
An IO request from the uc480 driver failed.
Possibly the versions of the uc480.dll (API) and
the driver file (uc480_usb.sys) do not match.
Function executed successfully
Related functions
is_GetNumberOfCameras()
Example
// At least one camera must be available
INT nNumCam;
if( is_GetNumberOfCameras( &nNumCam ) == IS_SUCCESS) {
if( nNumCam >= 1 ) {
// Create new list with suitable size
UC480_CAMERA_LIST* pucl;
pucl = (UC480_CAMERA_LIST*) new BYTE [sizeof (DWORD) + nNumCam * sizeof (UC480_CAMERA_INFO)];
pucl->dwCount = nNumCam;
//Retrieve camera info
if (is_GetCameraList(pucl) == IS_SUCCESS) {
int iCamera;
for (iCamera = 0; iCamera < (int)pucl->dwCount; iCamera++) {
//Test output of camera info on the screen
printf("Camera %i Id: %d", iCamera,
pucl->uci[iCamera].dwCameraID);
}
}
}
delete [] pucl;
}