Skip to navigation Skip to content
JonRipley.com

Navigation

Main content

DLL Function Importer

DLLImport (zip) 1.01 23-Aug-2009 (102k) (Screenshot)
DLLImport (Installer) 1.01 23-Aug-2009 (102k) (Screenshot)
-------------------------------------------------------------------------------
 Program : DLLImport
 Purpose : Import Functions from DLLs for use in BBC BASIC for Windows
 Author  : Jon Ripley, incorporates software written by Nir Sofer
 Version : 1.01 (23rd August 2009)
-------------------------------------------------------------------------------

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 the code required to load, setup 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.

If not using the installer to install DLLImport just unzip the contents
of DLLImport.zip to any convenient location on your computer, no
installation is required. To uninstall the program simply delete it from
your hard drive.


Usage
=====

Select a DLL file or a DLL Export Viewer file as the input file and select
as the output file the location and format you want to save the resulting
file in.  Click the generate button to create the code ready for use in
your programs.

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 setup 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.


Using DLL Export Viewer
=======================

To select only a few functions to import from a DLL you can use Nir Sofer's
DLL Export viewer which is included with this program.  To run DLL Export
Viewer click on the Export DLL button in the main window.

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 import or choose the Edit > Select All
menu item to select everything.  Now select the File > Save Selected Funtions
from the main menu and save the function list as 'Tab delimited text (*.txt)'
and close DLL Export Viewer.

Load this file into the DLL Function Importer and continue as normal.

Information
===========

DLL Export Viewer is (C) Nir Sofer 2005-2009 http://www.nirsoft.net/

Any Browser! Valid CSS! Valid XHTML 1.0 Transitional