 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Soup Guest
|
Posted: Fri Jan 02, 2004 11:10 am Post subject: Delphi 8 + BDE + Library + Unmanaged caller = DOA |
|
|
The following code example works fine in an all managed environment, all
Delphi 8, or linked in from C# (in fact you can reference the shared
libraries in "C:Program FilesCommon FilesBorland SharedBDSShared
Assemblies2.0" and do it all in C# if you are so inclined... and it
works, quite well in fact).
*However* if you compile it into a dll and invoke it from unmanaged code
(like oh, say... a Delphi 7 app), it dies with the following error:
"Function pointer was not created by a Delegate." Playing around with
explicit creation of TSessions and TDatabases suggest that the first BDE
related control to attempt Open/Active/etc will always die with the same
error.
m_bdeTable := TTable.Create(nil);
m_bdeTable.DatabaseName := 'c:scratch';
m_bdeTable.TableName := 'test.db';
m_bdeTable.Active := true; // <- Dies
This is a sticking point to transitioning existing Delphi 7 code into
managed libraries so I'm hoping someone has a solution. I've tried
manually creating TApplications and assigned parents and other bizarre
fix attempts but to no avail. Any suggestions would be appreciated.
Thanks in advance for your time,
Damon
|
|
| Back to top |
|
 |
Jeff Guest
|
Posted: Fri Jan 30, 2004 7:14 am Post subject: Re: Delphi 8 + BDE + Library + Unmanaged caller = DOA |
|
|
With a licensed copy of Delphi 8 is it possible to reference and use
BDE.NET from within VB.NET and any other CLR language. Does anyone
know if BDE.NET is thread safe?
Soup <nada (AT) nil (DOT) null> wrote
| Quote: | The following code example works fine in an all managed environment, all
Delphi 8, or linked in from C# (in fact you can reference the shared
libraries in "C:Program FilesCommon FilesBorland SharedBDSShared
Assemblies2.0" and do it all in C# if you are so inclined... and it
works, quite well in fact).
*However* if you compile it into a dll and invoke it from unmanaged code
(like oh, say... a Delphi 7 app), it dies with the following error:
"Function pointer was not created by a Delegate." Playing around with
explicit creation of TSessions and TDatabases suggest that the first BDE
related control to attempt Open/Active/etc will always die with the same
error.
m_bdeTable := TTable.Create(nil);
m_bdeTable.DatabaseName := 'c:scratch';
m_bdeTable.TableName := 'test.db';
m_bdeTable.Active := true; // <- Dies
This is a sticking point to transitioning existing Delphi 7 code into
managed libraries so I'm hoping someone has a solution. I've tried
manually creating TApplications and assigned parents and other bizarre
fix attempts but to no avail. Any suggestions would be appreciated.
Thanks in advance for your time,
Damon
|
|
|
| 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
|
|