Article View: borland.public.cppbuilder.database.multi-tier
Article #1405Re: TDatabase shared in DLLs
From: Jeff Overcash (TeamB)
Date: Sun, 14 Nov 1999 00:00
Date: Sun, 14 Nov 1999 00:00
59 lines
3024 bytes
3024 bytes
"Clayton M. Arends" wrote:
>
> Okay, given the advice from Mark and Jeff I have decided that maybe a
> package will be the best way to go about solving my problem. However, the
> only use I have of packages is in creating components. I've never created a
> package to be used for purposes like this. (i.e. a replacement for a DLL).
>
> When I tried I ran into several problems. And I have several questions on
> this matter.
>
> 1. I'm using the project manager to keep track of all my DLLs and EXEs and
> such. Is it possible to create a package that will only show up in the PM
> or on a project by project basis rather than showing up in the "Package
> Manager" (Component | Install Packages)?
>
You can add packages to a project group, but whenever you activate that pacakge
to work on you will get the Package Editor to work on it.
> 2. I created a datamodule in the package. Where and how should the data
> module (or other form) get created? In normal executables the creation
> would happen in WinMain -- (i.e. CreateForm(__classid(TBlah), &Blah);
>
You can do this bacsically at any stage. If you are using an import library
(which I recommend) to tie the packageto your main project then it is loaded
early and will be available to you in your WinMain function.
> 3. When I turned the option to "Build with runtime packages" on and added my
> new package to the list the linker reported a "Unresolved external." We all
> know what that means. How do I actually use the package correctly?
>
You need to add the PACKAGE macro to your class declaration like
class PACKAGE TChildInPackage : public TForm
{...};
> I guess what I'm trying to say here is ... HELP! Do you have any good URLs
> or examples in the help system that I can go to to find out how to use
> packages correctly? I'm getting desperate.
>
Sorry I didn't respond quicker on this, I didn't have the time until this
morning to throw together a little sample program. If you want it e-mail me and
I'll send it to you.
> Thanks again,
>
> Clayton
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Anyone who cannot cope with mathematics is not fully human.
At best he is a tolerable subhuman who has learned to wear
shoes, bathe and not make messes in the house. (Heinlein)
Technical Details
Message-ID:
<382EE7BC.1A0CB3E7@onramp.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<801s1k$j688@forums.borland.com> <38270BCD.1A5999D8@ix.netcom.com> <38271BF5.BB1544AF@ix.netcom.com> <8080in$b1m3@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,b1244f56f55e7a5 X-Google-Attributes: gidfcd2b,public From: "Jeff Overcash (TeamB)" <overcash@onramp.net> Subject: Re: TDatabase shared in DLLs Date: 1999/11/14 Message-ID: <382EE7BC.1A0CB3E7@onramp.net> X-Deja-AN: 548490080 Content-Transfer-Encoding: 7bit References: <801s1k$j688@forums.borland.com> <38270BCD.1A5999D8@ix.netcom.com> <38271BF5.BB1544AF@ix.netcom.com> <8080in$b1m3@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: TeamB Mime-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.multi-tier