🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2571

Re: dynamic_cast does not work in packages

#2571
From: Torsten Franz
Date: Thu, 15 Feb 2007 15:07
20 lines
2008 bytes
>> Have you tried using LoadPackage() and UnloadPackage() rather than
>> LoadLibrary() and FreeLibrary()?
>
> yes. with thesame result.

Hi,
I once created a plugin system in our company with BCB5 and had the same  
issue in the very beginning.
The way to solve it was to ensure that all parts of the program (plugin,  
host, base bpl/dll) are compiled with dynamic RTL and VCL otherwise you  
end up with different instances of the VCL as already described by Remy.

To accomplish dynamic linking it might be useful to check your sources for  
'#pragma link' entries which should be removed.
Additionally you should check in all project files that the LIBRARIES  
section is empty, the SPARELIBS section should contain the same entries as  
found in the PACKAGES section (except the different extension of course)

HTH
Torsten
Technical Details
Message-ID: <op.tnspm2c1k53erk@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45c1f643@newsgroups.borland.com> <45c7c793$1@newsgroups.borland.com> <45c7cad8$1@newsgroups.borland.com> <45c83ebc@newsgroups.borland.com> <45c8b0b1$1@newsgroups.borland.com> <45d08f2f@newsgroups.borland.com> <45d2ce9a$1@newsgroups.borland.com> <45d35d25$1@newsgroups.borland.com> <45d41cb4$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,eea25a98edb328b5
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 15 Feb 2007 16:07:40 +0100
Subject: Re: dynamic_cast does not work in packages
From: "Torsten Franz" <"FirstName_LastName at agilent dott com">
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
References: <45c1f643@newsgroups.borland.com> <45c7c793$1@newsgroups.borland.com> <45c7cad8$1@newsgroups.borland.com> <45c83ebc@newsgroups.borland.com> <45c8b0b1$1@newsgroups.borland.com> <45d08f2f@newsgroups.borland.com> <45d2ce9a$1@newsgroups.borland.com> <45d35d25$1@newsgroups.borland.com> <45d41cb4$1@newsgroups.borland.com>
Content-Transfer-Encoding: 7bit
Message-ID: <op.tnspm2c1k53erk@newsgroups.borland.com>
User-Agent: Opera Mail/9.01 (Win32)
NNTP-Posting-Host: 192.25.19.11
X-Trace: newsgroups.borland.com 1171552037 192.25.19.11 (15 Feb 2007 07:07:17 -0800)
Lines: 20
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail