Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2006 Jul : Font, resources and DLL

www.cryer.info
Managed Newsgroup Archive

Font, resources and DLL

Subject:Font, resources and DLL
Posted by:"Serge Dosyukov (Dragon Soft)" (serge [at] dragonsoftru [dot] com)
Date:Mon, 31 Jul 2006 17:12:00

I have main application which has TLabel on it
I have DLL which is dynamically loaded at runtime and contains one procedure
which purpose it to modify Font settings of the Label passed as TObject upon
call

Sequence:
* start application
* create form with label
* load DLL
* call procedure, pass TLabel as parameter
* unload DLL
* start closing application - AV

Now it works fine up until application is about to be closed - AV is thrown
and it appears to be that after DLL is unloaded there is a collision in
resources of the Font object

is there a way to let DLL know that it should use host app resource space?
hookup for TApplication and TSession does not help

PS. Would it be useful to put QC# to able hook any Delphi/VCL based DLL (no
BPLs) by special predefined call (optional) so it works in the same space as
main application?

Replies:

www.cryer.info
Managed Newsgroup Archive