dyn.load
Foreign Function Interface

Description

Loads or unloads an external DLL and tests whether an external function is loaded.

Usage

dyn.load(x, local = TRUE, now = TRUE, ...)
dyn.unload(x)
is.loaded(symbol, PACKAGE = "", type = "")

Arguments

x a character string representing the name of a DLL to be loaded.
local a logical flag. If TRUE (the default), the symbols of the DLL are stored in its local table; otherwise, the symbols are added to the global symbol table. Support for this option is OS-specific.
now a logical flag. If TRUE (the default), the DLL is loaded immediately; otherwise, its loading is delayed until a functions inside the DLL is called. Support for this option is OS-specific.
... additional arguments for other methods.
symbol a character string representing the function name to check.
PACKAGE a character string representing the package (the DLL) in which to check for symbol.
type a character string representing the type of the symbol to look for. The value can be any(""), "C", "Fortran", "Call", and "External".

Details

The function dyn.load loads a DLL into the engine. Users can use .C, .Call, Fortran, or External to call those functions that reside in the DLL.
The function dyn.unload unloads the DLL from the engine.
The function is.loaded checks if the function with the symbol name is loaded. If it is loaded, users can use .C, .Call, Fortran, or External to call that function.
Value
dyn.loadreturns an object of class DLLInfo.
is.loadedreturns a logical flag to indicate whether the symbol is loaded.
References
Becker, R. A., Chambers, J. M., and Wilks, A. R. 1988. The New S Language. Pacific Grove, CA: Wadsworth & Brooks/Cole Advanced Books and Software.
See Also
library.dynam, .First.lib, .C, .Fortran, .Call, .External
Examples
is.loaded("PDF", type = "External")
Package base version 6.0.0-69
Package Index