[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Quick Reports in DLL

Posted on 1999-11-19
6
Medium Priority
?
235 Views
Last Modified: 2010-04-04
I want to put a quick report form in a DLL.
It works fine but for one problem.
When I close the form the application calling the DLL freezes.
I create/destroy the QR form dynamically etc. The Standard delphi form is OK, as are database connnections, its just this QR form !!!
0
Comment
Question by:liferily
  • 3
  • 3
6 Comments
 
LVL 10

Expert Comment

by:Lischke
ID: 2219359
Mmmh, how do you create the form? Do you set Application as owner? Have you passed in the application handle from the main application to the DLL?

Ciao, Mike
0
 

Author Comment

by:liferily
ID: 2219460
I have not passed the application handle explicitly. I will look at that next..

I have created a standard delphi form
(application owned)

from that I create a QR form
(application owned)

I destroy the QR form after previewing it, then destroy the standard form after showing it

I get to FreeLibrary(Handle); at which point it freezes - trying to free the library.
0
 
LVL 10

Expert Comment

by:Lischke
ID: 2219485
AFAIK, the problem is that the DLL as well as the main application create their own TApplication object. If you now create the form in the DLL with the TApplication object from there and try to free it from your main application then the wrong TApplication object is used.

Not sure if that's the true problem, but try either to allocate and free all forms belonging to the DLL only in the DLL or make both TApplication objects the same (preferably the main appl. stays...).

Ciao, Mike
0
2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

 

Author Comment

by:liferily
ID: 2219486
I have just passed the application handle in a quick test app

It appears to work !!!!!

I will go back to a more involved program and check it out in more depth.

If all goes OK the points are yours if you want them - Do you need to post an answer ????

Cheers Lischke,

liferily.
0
 

Author Comment

by:liferily
ID: 2219501
I think you've hit the handle on the head (sort of pun!).

The forms were all created and destoyed within the DLL, however I don't think I was using the correct application handle within the DLL.

Like I've just said I'll have a more in-depth investigation...
0
 
LVL 10

Accepted Solution

by:
Lischke earned 2000 total points
ID: 2219515
Fine :-) I just propose an answer here to make sure no other does. The "accept as answer" feature works also very well...

Ciao, Mike
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses

607 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