 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
P Bisseker Guest
|
Posted: Wed Jul 09, 2003 10:41 am Post subject: Re: Can I pass an ADODatset.Recordset as an OleVariant to a |
|
|
Thank you both. I'll have a play around and see which works best for me.
Paula
"Oliver Pavey" <oliver (AT) hotsoft (DOT) com> wrote
| Quote: | I believe you will need to define the function as safecall to do this. I
can't recall where I read this. There may be other complications.
In my own code I have used a record with Variant members and passed a
pointer to the variant across the DLL boundry. This is simple and works.
(I designed it like this because I'm using a Delphi DLL to give me
access to COM objects from a language which does not have native COM
support.)
My code only accesses the record from within the one DLL (the pointer
gets passed back later on), but I think it will work from any section of
your program.
Oliver.
John Edward Scott wrote:
Hi Paula,
Yeah it should be possible, I assume you don't have control over the dll
too? If so I'd suggest using RecordSets as the parameter your passing to
the
dll rather than as an OleVariant.
Firstly I'd suggest checking the types of the data your going to be
marshalling across since they might not all be marshalled
properly/easily
and you may have to do some of the hard work yourself.
Secondly, be aware of the different calling conventions for dll's
written in
different languages (cdecl, stdcall etc).
Hope this helps,
John.
"P Bisseker" <paulab (AT) Minorplanet (DOT) com> wrote in message
news:3ef0677d (AT) newsgroups (DOT) borland.com...
I would like to pass 2 ADODataset.Recordsets to a dll. One to pass data
in
and the other to retreive manipulated data back.
Can I use OleVariants to do this and will the dll be able to work with
OleVariants whether or not it is written in Delphi, VB or any other
language.
I hope this makes sense, I'm not very technical.
TIA
Paula
|
|
|
| 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
|
|