Skip to main content

[DLL] Dynamic Link Library

Format

OPEN (chan,[fileopt])"[DLL:lib_name;fnc_name]params"

Where:

[DLL ..]

File tag clause to inform PxPlus that it will be opening a Dynamic Link Library (DLL).

chan

Channel or logical file number to open.

fileopt

File options.

fnc_name

Case-sensitive name of the function. It acts as the entry point into the library. String expression.

lib_name

Path and/or name of the freestanding Dynamic Link Library that contains the external function you want to invoke. String expression.

params

DLL-specific parameters. Semi-colon separated arguments and/or variables to receive returned values, etc.

Description

The [DLL] tag is used as a prefix in an OPEN statement to denote that PxPlus is to route all file I/O requests to an external (user defined) DLL. The [DLL] tag is built into the PxPlus programming language, which recognizes the tag and deals with it internally at run time. A DLL is a freestanding Dynamic Link Library of 'C'-style functions (external to PxPlus) that is used in Windows environments. For library names, the .DLL extension is not mandatory (other extensions, such as .EXE, are also used). Case-sensitive function names serve as entry points into the DLL.

GPFs are not uncommon.

Example

process server "Inventory" on "[DLL]c:\app\server.dll;Entry"
open (1)"[dll:dbase2.dll;entry]cust.db"

See Also

DLL( ) / DLX( ) Call External Function
OPEN Open a File for Processing