Chapter 11 417
Optimizing Agilent VEE Programs
Using Dynamic Link Libraries
Using Dynamic Link Libraries
On PCs, you can use the compiled functions from Dynamic Link Libraries
(DLLs) as a part of a VEE program. DLLs may be compiled functions that
you have written yourself (contact Microsoft for documentation about
writing DLLs), or DLLs that you have purchased or downloaded from the
Web.
Note VEE supports both the "_cdecl" and "_stdcall" calling conventions.
Most customer-written DLLs use the
_cdec1 calling convention. Most
Win32 API calls use _
stdcall. VEE supports both naming conventions, so
you can use most off-the-shelf DLLs as well as your own.
Integrating a DLL into an Agilent VEE Program
This section describes how to import a DLL into a VEE program. Write or
obtain the DLL as described above, then follow these steps to use the DLL:
1. Select
Device ⇒ Import Library.
The
Library Type includes three choices: UserFunction, Compiled
Function
, and Remote Function. Change the Library Type field
to
Compiled Function (the default is UserFunction). For a
Compiled Function, the Import Library object includes a field
for the
Definition File, as shown in Figure 11-6.
Figure 11-6. Importing a Library of Compiled Functions