tags:

views:

141

answers:

2

Hi,

I learned something about DLL's yesterday. But I haven't found the way how to use all of the functions and procedures in DLL without writing this line into code of application for every function and procedure I want to use.

function CircleArea(const radius : double) : double; external 'circle.dll';
+3  A: 

Perhaps you could put the DLL import declarations into a single unit, save the unit to a common folder and use this unit in all of your projects.

Alan Clark
+6  A: 

Unfortunately, for standard DLLs in Windows, there isn't a standard to define each function's parameter types, so there is not any way to say "Please generate the code for all of the functions in this DLL".

There have been various attempts to do this over the years, mostly integrated into other technologies, from COM all the way to .Net. Indeed, Delphi's BPL format is essentially a DLL with this sort of information included as well as code to share all of the type information between the DLL and the main application.

N@

Nat