简体   繁体   中英

Loading a dll at run-time - Delphi

I use a dll that has above 300 functions and I need at least 50 of them. I need to load the functions during run time using LoadLibrary , GetProcAddress etc. My problem is that my code is becoming too huge, around 500 lines. Is there a more refined method ?

根据所使用的Delphi版本,可能会发现更容易使用Delphi的“ 延迟加载”功能,方法是将delayed关键字添加到DLL函数声明中,然后让Delphi为您处理LoadLibrary()GetProcAddress()调用。

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