DLL "import units"

In article <burleigh.813606...@bronze.ucs.indiana.edu>,

Quote
Frank Burleigh <burle...@bronze.ucs.indiana.edu> wrote:
>The *Language Guide* suggests using import units in projects that call
>DLLs.  The import unit contains types and proc/func declarations so
>that all projects using the DLL can depend on this import unit.  The
>the dox are silent on how or even whether a DLL's import unit should
>be integrated with the DLL project itself.

>It seems to me that lines like this (from an import unit):

>  implementation

>  procedure SomeProc;external 'somedll';

>are fine for the importing project but make no sense for the DLL
>project since it would seem to tell that project that the proc is out
>in a DLL somewhere when really the proc is implemented in some other
>PAS file that is part of the DLL project.

You're right:  The import unit is only used on the importing end.  The
dll's procedure are not external to the exporter!

Plug time:  You may find my DLL Maker -

  ftp://deeptht.armory.com/pub/midnight_beach/dllmkr11.zip

- to be useful.  You tell it what units to put in the dll, and it generates
the library (export) and import units for you, exporting all "export" procs
*and* generating shell code to let you export statically bound object methods.  

--

http://www.armory.com/~jon               Personal Pages
http://www.armory.com/~jon/pubs             Programming Publications
http://www.armory.com/~jon/hs         Home School Resource List