Hello.

I wonder if anyone can tell me something about calling the external dll file from delphi.
I have a main form, which has the procedures locating the dll file, and then I have about 30 other forms, in which I use these commands. Now my question is, is it bad or performance-reducing if I replicate all of the availible commands in the code of all forms? Is there even any other-better way, so these commands linked to a dll would be only in main form, so the other forms call them via main form...?

One more thing: does it have any affect to the program, if I simply use all forms in every form in the Uses section, instead of filtering whichones I actually need...?

Thanks! :)

Marc

Recommended Answers

All 3 Replies

You can replicate it, but it is not necessary. Move the procedures for accessing your DLL to a separate unit, then you can include that one into all forms.

Will do then, sir. :) Thank you.
How about all those "uses", does it affect if mentioning all forms in eachone instead of filtering the ones that are actually in use?

It won't make much of a difference, but personally I try to minimize them and only include what's needed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.