Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Problem with Delphi XE2, 10 Seattle, Application Handle, Dll, Action Error


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Jul 4, 2017 6:18 AM Last Post By: Rudy Velthuis (...
Janusz Buczak

Posts: 1
Registered: 6/22/12
Problem with Delphi XE2, 10 Seattle, Application Handle, Dll, Action Error  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2017 6:26 AM
I have App.exe applications created in Delphi XE2, then the DLL is created in Delphi 10 Seattle. When I pass an Application.Handle to a DLL after calling a DLL I get an error "Exception class .... 'floating point stack check ...'". When I remove the Application.Handle from EXE assignment, the DLL is ok. I noticed this is related to the TAction action that is hooked to controlek. Eg to MainMenu. I'll also add that when a DLL is called from an EXE that is written in Delphi 10 Seattle it's all ok.

Edited by: Janusz Buczak on Jun 29, 2017 6:27 AM
Peter Below

Posts: 1,227
Registered: 12/16/99
Re: Problem with Delphi XE2, 10 Seattle, Application Handle, Dll, Action Error [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2017 11:06 PM   in response to: Janusz Buczak in response to: Janusz Buczak
Janusz Buczak wrote:

I have App.exe applications created in Delphi XE2, then the DLL is
created in Delphi 10 Seattle. When I pass an Application.Handle to a
DLL after calling a DLL I get an error "Exception class ....
'floating point stack check ...'". When I remove the
Application.Handle from EXE assignment, the DLL is ok. I noticed this
is related to the TAction action that is hooked to controlek. Eg to
MainMenu. I'll also add that when a DLL is called from an EXE that is
written in Delphi 10 Seattle it's all ok.

Modules (EXE and DLL) written in different Delphi versions are not
necessarily compatible to each other, since they use different versions
of the run-time and VCL library. The larger the version gap, the higher
the chance of problems when you try things like integrating forms
implemented by the DLL into the host application.


--
Peter Below
TeamB

Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Problem with Delphi XE2, 10 Seattle, Application Handle, Dll, Action Error [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 4, 2017 6:18 AM   in response to: Peter Below in response to: Peter Below
Peter Below wrote:

Modules (EXE and DLL) written in different Delphi versions are not
necessarily compatible to each other, since they use different
versions of the run-time and VCL library. The larger the version gap,
the higher the chance of problems when you try things like
integrating forms implemented by the DLL into the host application.

Not only that. Because of different addresses, RTTI and memory
management may not work properly either.

FWIW, I wrote an article on the subject:

"DLL dos and don'ts"
http://rvelthuis.de/articles/articles-dlls.html

If you could read it, one fine day, and have any comments or see
anything wrong, please report back.

--
Rudy Velthuis http://www.rvelthuis.de

"Measuring programming progress by lines of code is like
measuring aircraft building progress by weight."
-- Bill Gates
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02