WladiD/AnyiQuack

TNotificationWindow won't work in a DLL (ActiveX Office add-in)?

Closed this issue · 3 comments

Hello,

I'm not sure why, but once TNotificationWindow is used in a DLL( an Office ActiveX add-in), it'll cause the host program (winword.exe for example) won't close, hang in the memory in the Task Manager.

Everything's ok with an VCL EXE. Do you have any hint for me? I tried commenting out the UseThreadTimer compiler directive but no change.

PS, I'm still using this commit before your big changes for FMX.

Hi,

I can't reproduce it, but maybe the finalization section will not be called in a ActiveX add-in, so you must call the class method TAQ.Finalize on exit manually. TAQ.Finalize is private so you have to make it public first.

@WladiD,

Great! That solved the problem! Would you make the following changes to AnyiQuack?

  • Make TAQ.Finalize public.
  • Add IsLibrary checking in the unit's finalization section:
finalization
  if not IsLibrary then
    TAQ.Finalize;

Thanks!

The changes are now applied.

Thanks for your response!