9
C
AMERA
S
UPPORT
L
IBRARY
C
AM
L
IB
The IS4910 Camera Support Library CamLib provides convenient interface between an application and
the IS4910 Device Driver. The library is available in two versions: static library (camlib.dll) and dynamic-
link library (camdll.dll). Both versions provide exactly the same set of high-level APIs to acquire images,
program, re-program or inquire the status of the camera device.
The library APIs are defined in the camlib.h header file. If an application uses the DLL version of the
library, then it must define the CAMDLL_IMPORTS macro before including the camlib.h header file.
Even though an application developer can call the IS4910 Device Driver directly, the CamLib APIs
provide an easier and more convenient way to communicate with the camera.
Note: The target OS must support the MultiByteToWideChar function in order for the camera support
library to open the device driver properly.
An application must call camInit() function to initialize the CamLib framework prior to any other calls to
CamLib.
Once the CamLib framework is initialized, an application must call camOpen() function to establish
communication with the camera device. This function returns the device handle, which must be used
from that point on as a parameter when making all consequent calls to other CamLib functions. The
detailed description of all CamLib APIs is provided below.
Camera Initialization APIs
The function camInit() must be called to initialize the CamLib framework prior to any other calls to
CamLib.
Once the CamLib framework is initialized, an application must call camOpen() function to establish
communication with the camera device. This function returns the device handle, which must be used
from that point on as a parameter when making all consequent calls to other CamLib functions.

camInit

This function should be called prior to any other calls to CamLib APIs. It allocates necessary resources,
initializes internal variables and structures used by CamLib.
Prototype:
int camInit (int dev_interface);
Parameters:
dev_interface - [in] Should be 0.
Return Value:
0: Success; -1: Failure

camFree

This function should be called to free resources allocated by the call to camInit.
Prototype:
int camFree (void);
Return Value:
0: Success; -1: Failure