简体   繁体   中英

Use all functions in DLL without declaring every one in application - Delphi

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';

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@

也许您可以将DLL导入声明放在一个单元中,将单元保存到公共文件夹并在所有项目中使用此单元。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM