SIMPOL Documentation

Chapter 15. Calling SIMPOL Functions as DLL Calls

Introduction

In this chapter we will discuss how we might call a SIMPOL program or even just a function as a DLL call from Superbase or Visual Basic. In order to use this functionality from Superbase it is essential that the user be running Superbase 3.6i build 496 or later, since only as of that release is it possible to call Win32 DLLs.

This functionality is not in as flexible a form as may be provided over the long term, but it is provided in a usable way in order to promote interoperability between existing Superbase applications and SIMPOL programs. There are a few limitations such as only a single string argument can be passed to the function being called in SIMPOL and only a single string can be returned as the result of the function call to the calling program. This is partly related to the differences in datatypes that are available to each language. In SIMPOL there are virtually no limitations on the size and precision of numeric types and the language supports both .nul and .inf as special values. Strings are also based on Unicode and are essentially unlimited in size. At another point in the future, there will be a method of accessing SIMPOL functions as DLL calls for interoperability but then it will be specifically designed to work with Win32 (and Linux and Mac OS-X) in as transparent a manner as possible.

In spite of the fact that only one string can be passed as an argument to the SIMPOL function, if it contains TAB-delimited items these will be asigned to separate string parameters in the target function.