General, Frequently asked questions, Linking – Teledyne LeCroy PeRT3 Software Interface User Manual
Page 4: How does linking work on windows and visual studio

General
PeRT
3
automation API is packaged as a C-interface windows DLL similar to an IVI-driver. The DLL
and a header file describing the interface are installed when you install the PeRT
3
package. Beginning
with version 1.4, there is both a 32-bit and 64-bit version of the DLL.
The API is a set of C standard functions exported from a windows DLL. The DLL and .h file follow the
IVI driver format – it is not strictly speaking an IVI driver as we do not currently include the soft-front-
panel files called for (but incompletely specified) in the IVI spec. They can be used directly by any
automation framework that supports generic C-interface windows DLL or automation frameworks that
expect IVI compliant drivers (as long as they don’t require the front panel file). The DLL can be imported
as a device driver manually in to NI’s LabView and has been used to control the PeRT
3
from LabView.
The LCPeRT.dll provides an interface that communicates to the PeRT
3
server (which controls PeRT
3)
. It
offers functionality fairly equivalent to the GUI. There is mostly a one-to-one correspondence between
GUI controls/operations and the API. You can execute a script from the API by name – so fairly complex
operations can be done easily by defining scripts using the GUI in advance, then executing them as
needed from the API.
When you install the software, the following files are installed:
o C:\Program Files\LeCroy\PeRT3\LCPeRT.dll - The 32 bit version of the API DLL
o C:\Program Files\LeCroy\PeRT3\LCPeRT64.dll -The 64 bit version of the API DLL
o C:\Program Files\LeCroy\PeRT3\LCPeRT.h - A C language header file that defines the API
functions.
o C:\Program Files\LeCroy\PeRT3\LCPeRT.lib - A Microsoft import library for statically linking
to the DLL using visual studio or a compatible development environment.
o C:\Program Files\LeCroy\PeRT3\docs\LCPeRT_API.txt – A text only version of this manual.
Attached is LCPeRT.h that includes the API functions and constants definitions.
LCPeRT.h
Frequently Asked Questions
Linking
How does linking work on windows and visual studio?
In Windows, there are a number of different ways to execute code in a DLL. You can either statically
link to the DLL at link time, or you can dynamically link to a DLL at runtime.
Dynamic linking at runtime requires you to write code that explicitly loads the DLL you want and then
get a pointer to the function you want to call and call it. The technique is useful if you want to be able to