We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,521 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Calling external dll from multiple forms

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

2
Contributors
3
Replies
10 Hours
Discussion Span
6 Months Ago
Last Updated
4
Views
Question
Answered
cucolino
Newbie Poster
22 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

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.

pritaeas
Posting Prodigy
Moderator
9,542 posts since Jul 2006
Reputation Points: 1,194
Solved Threads: 1,494
Skill Endorsements: 98

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?

cucolino
Newbie Poster
22 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

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

pritaeas
Posting Prodigy
Moderator
9,542 posts since Jul 2006
Reputation Points: 1,194
Solved Threads: 1,494
Skill Endorsements: 98
Question Answered as of 6 Months Ago by pritaeas

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0702 seconds using 2.65MB