Thread View: borland.public.cppbuilder.database.ado
1 messages
1 total messages
Started by C�dric LE FRINGERE
Thu, 12 Jan 2006 11:46
Share DataModule between Exe and Dll
Author: C�dric LE FRINGERE
Date: Thu, 12 Jan 2006 11:46
Date: Thu, 12 Jan 2006 11:46
37 lines
1840 bytes
1840 bytes
Hi,
I'm trying to share a DataModule with ADO components between an Exe and a
Dll.
So after, I call from the Exe LoadLibrary and GetProcAdresse, I invoke the
export procedure passing in parameter a pointer of my DataModule.
In the Dll, oftenly I can use TADOComponent one time (close and open on
TADOQuery), the second time I've got an access violation.
typedef void (WINAPI *PPROCEDURE) (TDataModule *);
module = LoadLibrary("myDll.dll");
if (module != 0)
{
procedure = (PPROCEDURE) GetProcAddress(module, "exportprocedure");
if (procedure != NULL)
{
procedure(MyDataModule);
}
}
Any idea what to do?
Thanks
--
C�dric LE FRINGERE
Ing�nieur
BA SYSTEMES
Route de Chavagne - BP 36
35310 MORDELLES
FRANCE
Tel : +33 (0)2 99 85 11 00
Fax : +33 (0)2 99 85 11 44
E-Mail : cedric.lefringere@basystemes.fr
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads