-------------------------------------------------------------------------------
Program : DLLImport
Purpose : Import Functions from DLLs for use in BBC BASIC for Windows
Author : Jon Ripley, incorporates software written by Nir Sofer
Version : 0.10 (16th October 2005)
-------------------------------------------------------------------------------
Introduction
============
DLL Function Importer is an essential productivity enhancing tool for BBC
BASIC for Windows programmers which provides a lot of power from a simple
interface. With DLLImport you can quickly start working with any DLL that
provides user accessible functions from within your BBC BASIC for Windows
programs.
DLLImport will write all code required to load, set up and import functions
from any DLL and saves a BBC BASIC PROCedure that you can incorporate into
your programs or use as the basis of a library. Optionally DLLImport will
create a complete shell library ready to be customised for your particular
needs. With only a few mouse clicks you can create hundreds, or thousands
of lines of BBC BASIC code.
To install DLLImport just unzip the contents of DLLImport.zip to any
convenient location on your computer, no installation is required. To
completely remove the program you only need to delete it from your hard
drive.
Usage
=====
Run DLLImport.exe and click on 'Export DLL' to load DLL Export Viewer. From
within DLL Export Viewer select the DLL(s) that you want to import functions
from and click OK to load the DLLs and open the main application window.
Select the functions that you want to use in your program or use the
'Edit>Select All menu item to select everything, once you are satisfied with
your selection you need to save your selection using either the save icon in
the toolbar or the File>Save Selected Funtions menu. Choose a name for your
file and save it as 'Tab delimited text (*.txt)'. We have now finished with
DLL Export Viewer and you can safely close the application if you wish.
Now we need to load the file we just created into the DLL Function Importer.
Enter the filename in the 'Input file' icon or click on the '...' icon to
open up a file selection window. Now choose where you would like the BBC
BASIC program to be saved, you can type the name into the 'Output file' icon
or click on the '...' icon to open a file selector window.
There are several options that you can change to alter the code generated by
DLLImport:
The 'SYS Prefix' and 'SYS Suffix' options control the variable names generated
for the function calls. The defaults will give you a variable name
'_HelloWorld%' for a function called 'HelloWorld', alternatively you might
like to use Richard Russell's style of `HelloWorld`, to do this just enter a
backtick '`' as the prefix and suffix.
The 'Function Name' option controls the name of the PROCedure created which
you will need to call from your program to set up the DLL ready for use. By
default this is called PROC_ImportDLLs.
The 'Create library shell' option will create a complete blank library shell
containing a dummy routine for every DLL function. This library will need to
be customised as the entry and exit parameters for each call cannot be
determined by this program, but if you want to provide a complete BBC BASIC
library this will save you many hours of work. This option is disabled by
default.
The last option 'Load into BBC BASIC when complete' if ticked will, if BBC
BASIC is installed on your system, load the created program into the BBC
BASIC editor.
To create the code required click 'Generate' to create the BBC BASIC.
Information
===========
DLL Export Viewer is (C) Nir Sofer 2005 http://www.nirsoft.net/
|