Article View: borland.public.cppbuilder.nativeapi
Article #15662How to use LoadPackage in BCB ?
From: Pang Fu
Date: Fri, 20 Jun 2003 05:58
Date: Fri, 20 Jun 2003 05:58
46 lines
2465 bytes
2465 bytes
You can find two good articles on the following links explaining how to use
Dynamic Package loading in Delphi.
Articles explain the concept very well and come with Delphi source code.
BUT!! Unfortunatelly there is no BCB version of these articles and examples.
http://www.vinorodrigues.com/insight/delphi/articles.htm
http://bdn.borland.com/article/0,1410,29119,00.html
http://bdn.borland.com/article/0,1410,27178,00.html
I've tried to convert Delhi code to BCB but I'm not successfull yet. Some of
the functions and types seems to be different in Delphi and BCB (check
HModule and LoadPackage in Delhpi7 and BCB6).
Questions :
(1) Is there any example showing how to use Dynamic Package loading in
BCB6?
(2) Is there any BCB (and Delphi) volontier gurus who can convert above
mentioned articles into BCB?
(3) Can some one convert the following Delphi code into BCB (please make
sure that BCB code does not complain about invalid type conversion at run
time on LoadPackage line).
type
TProc00 = procedure;
var
PackageModule: HModule;
Proc00: TProc00;
begin
PackageModule := LoadPackage('Package1.bpl');
if PackageModule <> 0 then
begin @Proc00 := GetProcAddress( PackageModule, 'ProC00' );
if @Proc00 <> nil then
Proc00;
UnloadPackage(PackageModule);
end;
end;
(4) Thanks...
Pang Fu
pangfu@hotmail.com
Technical Details
Message-ID:
<3ef2a233@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,2a0bcef6d2779e50,start X-Google-Attributes: gid10cc67,public X-Google-Thread: 102541,2a0bcef6d2779e50,start X-Google-Attributes: gid102541,public X-Google-ArrivalTime: 2003-06-19 23:08:54 PST From: "Pang Fu" <pangfu@hotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi,borland.public.cppbuilder.students Subject: How to use LoadPackage in BCB ? Date: Fri, 20 Jun 2003 15:58:24 +1000 Lines: 49 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 210.50.133.242 Message-ID: <3ef2a233@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1056088627 210.50.133.242 (19 Jun 2003 22:57:07 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail