Problems with share dlls

Posted on 2000-01-29
Medium Priority
Last Modified: 2011-10-03
I have a master application, this application load several dlls. These dlls can call another dlls for share data and a database connection.
Each time that a dll is loaded a instance of this dll is loaded in memory and make a another connection a Database.

This application is for Windows NT and 9x

I use Informix Dinamyc Server as Database server and i use TQuery components for access data.

I programming in Delphi 4 c/s.

How can I share a single database connection and variables for several dlls?

Note: Somebody tell me about createmapfile but I think is not a good idea because i need share a objects and executable code
Question by:jamiguel
1 Comment
LVL 12

Accepted Solution

rwilson032697 earned 140 total points
ID: 2426522
You will need to use packages to do this (in fact, using packages almost does the whole job for you...)

To turn package support on go to Project|Options -> Packages and enable "Build with runtime packages".

Do this for your .EXE and all your DLLs.

Now add a method to each DLL which passes in the necessary variables to that DLL which can then use them like any other variable.

And that should be that!



Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question