dll add a unit

I'm still working on a dll with delphi. I try just to add a unit to that dll and get an application excetion, see the madshi screen dumps for details.
This unit contains a class  TPointList = Class (TList) with several functions, this unit is already used by 3 other programs without any strange behaviour or known bug.
I  could add another unit with a simillar list like TPointList without any problem to my dll project.

do not expect a complete solution for the answer to this post, any good idea on debugging and finding the reason is welcome.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The error message is pretty much telling you what the problem is, the trick is in combining an accurate interpretation of the message with what you are trick ing do in the DLL.  I am forced to guess on some of this though.
This sounds a bit like you are trying to create something in your application directly from the code in the DLL.  The problem may also be that you are trying to refer to the DLL's TPointList directly rather than through functions/procedures which are exposed by the DLL.
Is this unit a dynamically loaded DLL or a statically lodaed one?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
 I would load Delphi with the source of the DLL and place breakpoints on all of the calls, set the Host application (under Run | Parameters) to the test program and run it.  This will allow you to step through the calls within the DLL and see if the error is explained that way.

  The most common issue I have seen with DLLs causing unknown exceptions is a misaligned call stack.  To check this I generally check the size of the data being pushed onto the stack versus the amount being taken off the stack by the DLL function (you must use the CPU view to do this).  If the two sizes do not match up then you know you have a parameter size mismatch which is causing a stack misalignment.  This can cause a wide range of error types.
BdLmAuthor Commented:
may be I found a hot hint on the error root cause, assume it is the free pnp image lib, more to come shortly
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

BdLmAuthor Commented:
the reason: I used a few units which included QDialog, QGraphics  and a few other which used dialog, graphics, ...
now I deleted all the q-Units from Borland and used the default version, the dll is now running a bit more  :-)

I did not understand why applications did not claim or create run time errors the dll is failing to compile ....
It is likely failing to compile due to the components you removed that it was using.  Did you want help making it compile without the extra components?
BdLmAuthor Commented:
thanks for the offer, compile is now no problem, but I have to eval the other APPS IF SOMETHING HAPPEND while changing so many include files ,   this will be a time break on this question
BdLmAuthor Commented:

after removing QForms by Forms, can compile and run that DLL project.
What to to with your points ?

Can someone explain why QForms and Forms do not beat each other inside a APP but a fatal if used inside a DLL ? That  makes sense to accept as the answer ...  OK for you both?



I am unfamiliar with QForms.  I would be more likely to believe that there is a bug in QForms that is causing the problem within the DLL.  If I were you I would be curious to put back as little QForms functionality as I could and try to determine which piece of functionality causes the error to re-occur.

If we helped you to arrive at a solution, split out the points based on who was the most help.
BdLmAuthor Commented:
the solutution was QForms and Forms interaction, anyhow the tips posted are helpful ,
not sure if only a Delphi 7 issue or also other versions are affected
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.