ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Toolbars not working when run inside DLL
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

holgerflick

5 Posts

Posted - Jun 15 2020 :  22:07:45  Show Profile  Reply
I am currently evaluating ImageEn inside of Delphi 10.3. I am really amazed at the features and everything works nicely as long as I run the application from an exe file.

As soon as I call the VCL form with the controls inside a DLL, the interaction with the toolbars does not work anymore. I can call any operation and it works. However, when I select the operation like open, save, rotate, etc. from the toolbar TImageEnViewtoolbar or auto toolbar, nothing happens.

How can I get the toolbar functionality to work when the form is inside a DLL? I have no idea how a DLL is different from the from being inside an EXE, but I guess something gets lost when compiling into the VCL.

Thanks!

xequte

38222 Posts

Posted - Jun 16 2020 :  00:21:37  Show Profile  Reply
Hi

Can you send me a simple DLL project that reproduces the issue so we can test it here.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

holgerflick

5 Posts

Posted - Jun 16 2020 :  00:36:33  Show Profile  Reply
Done.
Go to Top of Page

xequte

38222 Posts

Posted - Jun 17 2020 :  21:26:46  Show Profile  Reply
Hi

This looks to be due to a VCL bug not supporting custom TActions (that implement ExecuteTarget/UpdateTarget) in DLLs.

I can confirm this by adding standard VCL actions, such as: TFileExit, TBrowseForFolder.

These work in an exe, but fail in a DLL.

I've created a workaround, that forces it to work in DLL's. In 9.1.1 or newer open ie.inc and enable the SupportToolbarInDLLs define. Then recompile your packages or ensure you are building your project from source.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

holgerflick

5 Posts

Posted - Jun 18 2020 :  10:01:18  Show Profile  Reply
Thank you. Please send me your test case so I can log a bug in Embarcadero's tracking system.
Go to Top of Page

xequte

38222 Posts

Posted - Jun 18 2020 :  17:31:25  Show Profile  Reply
Hi

I've already logged it with Embarcadero.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

38222 Posts

Posted - Mar 29 2021 :  19:32:58  Show Profile  Reply
Note: In v9.3.2 you can enable DLL support in code using:

  // Support Toolbar usage In DLLs
  IEGlobalSettings().EnableDLLMode := IsLibrary;


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: