ProvideX V8.20 > Language Reference > 9. Special Command Tags
774
[DLL] Tag
           Custom File Access
Format
OPEN (chan,[fileopt])"[DLL:lib_name;fnc_name]params"
Where:
[DLL ..]
File tag clause to inform ProvideX that it will be opening an external
DLL for I/O requests.
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 DLL file that contains the external function
you want to invoke. String expression.
params
DLL-specific parameters. Semicolon-separated arguments and/or
variables to receive returned values, etc.
Note: For use in WindX or Windows only.
Description
The [DLL] tag is used as a prefix in an OPEN statement to denote that ProvideX is to
route all file I/O requests via an external DLL (Dynamic Link Library) file. This is
intended primarily for mapping to customized (user-defined) routines for file access.
For access methods in ProvideX using industry-standard mechanisms, refer to the
sections on the [OCI] and [ODB] tags.
Calling Sequence
This interface uses a single parameter block to handle all communication between
ProvideX and the DLL. Whenever a DLL entry point is called, the parameter block is
passed to it as its argument.
The DLL's return value determines completion status. A successful completion returns
­1. Any other termination status is assumed to be a ProvideX error code; e.g.,
Record/File Busy
0
End of file
2
Record not found
11
File not found
12