Specifications

sharpVISION™ Camera
sharpVISION VISION SDK
9
2
2
.
.
U
U
s
s
i
i
n
n
g
g
s
s
h
h
a
a
r
r
p
p
V
V
I
I
S
S
I
I
O
O
N
N
S
S
D
D
K
K
2.1. Programming Language
A C/C++ header file is included in the SDK (SharpAPI.h file in the Include sub-directory).
Most compiled languages can call functions; you will need to write your own
header/import/unit equivalent based on the C header file.
In Windows version a Visual Basic module is included in the SDK (SharpAPI.bas file in the
Include sub-directory). VB cannot use SvQueueOneFrame or SvQueueCameraSettings or
related functions, because these functions have callbacks which occur on a different thread. If
you want to use VB, you might need to write some C code depending on your application's
requirements. The same issue with asynchronous callbacks, above, also applies to Java.
The Windows driver is a DLL (SharpDrv.dll) that resides in the system32 directory. It may be
found also in the Bin sub-directory.
MS Visual C++™: A Visual C++ 6.0 stub COFF library is provided (SharpDrv.lib in the Lib
sub-directory); if you are using Visual C++, link to SharpDrv.lib. The DLL uses Windows
standard calling conventions (_stdcall).
Borland C++ Builder™: the SharpDrv.lib file is in COFF format. Borland C++ Builder
requires the OMF format. To convert the library into to OMF format, use the IMPLIB Borland
tool with the following syntax: “IMPLIB SharpDrv.lib SharpDrv.dll”.
Other compilers: the Most other compilers can create a stub library for DLLs. The DLL uses
Windows standard calling conventions (_stdcall).
MAC OS Project Builder™: the driver is a Framework that resides in the
/Library/Frameworks folder. If you use Apple Project Builder 2.1, add the
sharpVISION.framework file to your project.
2.2. Load/Unload the Driver
The first call into the sharpVISION driver must be SvLoadDriver. Call SvUnloadDriver when
you are finished.