 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Bernd Foerder Guest
|
Posted: Sun Nov 21, 2004 10:41 am Post subject: Using a TDatamodule within a runtime package |
|
|
Hi,
I tried to put an TDatamodule in an runtime package, but the problem is that
the global variable:
TDatamodule* Datanodule1;
is not initalized. It is set to 0x0;
Normaly it is initalized by the Application.
My question now is:
How to initialize the Datamodule in the DLLEntryPoint funktion,
so that I can access the content of the Datamodule without getting an
exception.
I have tried to create it with "new TDatamodule(NULL) " , but in this case i
got also an exception when the Datamodule start to create its contents.
Does anybody has an idea how to fix that problem.
Thanks in advance
Bernd
|
|
| Back to top |
|
 |
Don Locke Guest
|
Posted: Sun Nov 21, 2004 2:30 pm Post subject: Re: Using a TDatamodule within a runtime package |
|
|
Try this:
TestDM = new TTestDM(Application);
Put it into the dll function called by the application. But you would be
better off using a package as if works better with VCL. I started to
convert a large program into dlls but ended up using packages. HTH.
Don
|
|
| Back to top |
|
 |
Bernd Foerder Guest
|
Posted: Wed Nov 24, 2004 10:31 am Post subject: Re: Using a TDatamodule within a runtime package |
|
|
Hi Don,
thanks a lot for that tip. I tried it and it works well.
During my test, i found out that the Forms:Application variable is
initialized by the package.
Not in the DllEntryPoint, but later it is initalized.
My goal was to encapsulate the DB accesses totaly from the Application and
now it works.
Greetings Bernd
"Don Locke" <dgnospamlocke (AT) comcast (DOT) net> schrieb im Newsbeitrag
news:41a0a68b$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Try this:
TestDM = new TTestDM(Application);
Put it into the dll function called by the application. But you would be
better off using a package as if works better with VCL. I started to
convert a large program into dlls but ended up using packages. HTH.
Don
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|