CitectVBA Programming Reference > Understanding CitectVBA Language Basics > DLLs and APIs

DLLs and APIs

Dynamic Linked Libraries (DLLs) are files that contain functions which can be called from any application running under Microsoft Windows. At run time, a function in a DLL is dynamically linked into an application that calls it. No matter how many applications call a function in a DLL, that function exists in only a single file on the computer, and the DLL is loaded only once in memory.

An application programming interface (API) is a set of functions you can use to work with a component, application, or the operating system. Typically an API consists of one or more DLLs that provide some specific functionality.

For example, the Windows API includes the DLLs that make up the Windows Operating System (OS). Every Windows application interacts with the Windows API directly or indirectly. The Windows API is provided so that all applications running under Windows can behave in a consistent manner.

Note: CitectSCADA itself provides an API for external access to CitectSCADA I/O variable tags via a DLL interface.

APIs are traditionally written for C and C++ programmers who are building Windows applications, however, the functions in a DLL can also be called by other programming languages, including CitectVBA. Because most DLLs are written and documented primarily for C/C++ programmers, calling a DLL function may differ somewhat from calling a CitectVBA function. In order to work with an API, you need to understand how to pass arguments from CitectVBA to a DLL function. See Passing Arguments to DLL Functions from CitectVBA.

See Also

Passing variables Byref and Byval

CitectVBA Function Reference