REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 30-Jul-2009 Edit History  

REBOL 3 Concepts: Plugins: Using Plugins

A plugin module is a DLL (dynamic library) that lets you extend REBOL by providing access to functions that run in native code (e.g. C code.) For general info, read plugins.

Importing a plugin

Plugins work like modules. You must import them before they can be used.

To import a plugin module called example:

import %example.dll

This line will:

See modules for more detailed information about how these steps are processed.

Note that the dll file suffix is important. It is what tells import that the file is a plugin module, not some other type of code or data. (The dll suffix and its load type are specified in the system/options/file-types block.)

Example usage

Once a plugin has been imported, you can use its exported function as you would any other type of function:

import %example.dll  ; exports add-mul

print add-mul 1 2 3
9


  TOC < Back Next > REBOL WIP Wiki Feedback Admin