Solved

dll add a unit

Posted on 2009-07-11
9
337 Views
Last Modified: 2012-05-07
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.

ee-dll-1.jpg
ee-dll-2.jpg
0
Comment
Question by:BdLm
  • 5
  • 3
9 Comments
 
LVL 22

Accepted Solution

by:
8080_Diver earned 125 total points
ID: 24836599
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?
0
 
LVL 21

Assisted Solution

by:developmentguru
developmentguru earned 375 total points
ID: 24859991
 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.
0
 
LVL 8

Author Comment

by:BdLm
ID: 24867013
may be I found a hot hint on the error root cause, assume it is the free pnp image lib, more to come shortly
0
 
LVL 8

Author Comment

by:BdLm
ID: 24874203
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 ....
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 21

Assisted Solution

by:developmentguru
developmentguru earned 375 total points
ID: 24878371
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?
0
 
LVL 8

Author Comment

by:BdLm
ID: 24878389
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
0
 
LVL 8

Author Comment

by:BdLm
ID: 25057894
Hi,

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?



Best

B.


0
 
LVL 21

Assisted Solution

by:developmentguru
developmentguru earned 375 total points
ID: 25074981
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.
0
 
LVL 8

Author Closing Comment

by:BdLm
ID: 31602480
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
Thanks,
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now