6
6
DLL DESCRIPTION
DLL DESCRIPTION
The USBLockIn250 can be addressed from other programs and LabView
TM
by calling functions
provided in a DLL. In order to make use of these functions as transparent as possible, the
following files are provided:
–
source code of the DLL
–
example in Borland C++ Builder 5.0 for using the DLL
–
example in Delphi for using the DLL
–
current versions of the DLL
This DLL is compatible with C calling conventions. The convention of the functions in C++ need
an underline in front of function names.
Locations of the different DLL file version are described in Section
6.1 W
ORKING
WITH
THE
DLL
IN
C++
PROJECTS
Add the lib-file generated from the
DLL to the project in Borland C++
Builder 5.0 by opening 'Project / Add
to Project' (see figure).
Chose the
lockin.lib
as the file to be
added.
If the lockin.lib does not exist, it can
be created from the command line:
–
open the command prompt by
running 'cmd' in 'Start/Run..' under
the Windows Start Menu.
–
Go to the directory in which the lockin.dll is located (e.g. '
' )
–
type: 'implib lockin lockin.dll'
The lockin.lib is created in the same directory based on the lockin.dll.
To call functions residing in the DLL, headers are necessary, so add 'import.cpp' also to the
project, which contains:
extern "C"{
double
_declspec(dllimport) cdecl SetLockInFreq (double freq);
void
_declspec(dllimport) cdecl SetLockInAmpl (double Ampl);
double
_declspec(dllimport) cdecl SetLockInPhase (double Phase);
long
_declspec(dllimport) cdecl SetLockInHarm (long Harm);long
_declspec(dllimport) cdecl SetLockInRollOff (long Time);
Manual Anfatec PCI-Lockin Amplifier AMU2.4 – Rev. 1.10 dated 30/09/20
Page 33 (70)