[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Delphi app crashes after unloading dll for the second time on Win 64

Posted on 2013-10-27
4
Medium Priority
?
812 Views
Last Modified: 2013-11-22
Hello,

I created a small app which loads two different dlls dynamically. Loading works fine, everythings is working. When I unload the dlls with freelibrary everything is still okay, but when I load any of the dlls again and unload one of them my app crashes. The strange thing is on Win 7 32-bit it works, on Win 7 64-bit it crashes.

Any help would be appreciated.

Many thanks in advance

Norbert
0
Comment
Question by:zabx2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 28

Expert Comment

by:Sinisa Vuk
ID: 39604401
My guess is that some COM stuff is not released correctly or there is some memory leak. Try to just load and free dlls without calling any function from it. Is this ok?
0
 

Author Comment

by:zabx2
ID: 39639921
Sorry for the delay.
Unfortunately your suggestion didn't work. I even deleted almost any components from the form and get the same error. I did some more research and encountered more strange errors.
When I build the DLL in an 64-bit environment and with DXE3 as a 32-bit DLL (!) the DLL works on Win 7 64-bit but crashes in Win 7 32-bit, but it is an 32-bit DLL!
I have no more time left doing some more research so I will build the DLL from scratch in DXE and will see what will happen.
Thank you very much.
0
 

Accepted Solution

by:
zabx2 earned 0 total points
ID: 39654948
Got a solution now. I'm working with several updated Developer Express components in my DLLS, and it is absolutely essential to set dxInitialie and dxFinalize in the initialization and finalization section of the main form. No where else! Not in form.create and not in form.destroy. Then everything works fine.

Thank you very much.
0
 

Author Closing Comment

by:zabx2
ID: 39668425
Found solution by myself.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Introduction to Processes
Suggested Courses

650 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