Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Parameters that can be used with Idispatch interfaces

0 views
Skip to first unread message

Dan Hughes

unread,
Feb 10, 1999, 3:00:00 AM2/10/99
to
Hello,
I was just wondering how to pass parameters in an idispatch interface that
are not supported, for example, I would like to use a text file, tquery,
database, and string lists in an automation object. I have tried using
olevariants, passing the associated item through and then attempting to
assign it to a local variable and passing it to the procedures that where
originally used in a dll. I get errors of incompatible types, when Iattempt
to assign the local variables the values of the olevariants. Also when I
attempt to assign the ole variant to the text file, I get an error of
"operator not applicable to this operand type".
Has anyone had any experience with this? Any help greatly appreciated.

Dan Hughes

bly

unread,
Feb 10, 1999, 3:00:00 AM2/10/99
to
Hello,

In COM, you don't/can't pass instances of language specific typed objects
mainly because it doesn't make sense at all. What does it mean for a VB
client to call a method in your server that hands out a TQuery? There's no
way a VB client can interpret or use TQuery at all because its
Delphi-specific.

However, you can wrap any Delphi class using another class that can expose
its methods and properties to the outside world using COM interfaces that
you normally define in your type library. Check out the TAutoIntfObject or
TInterfacedObject classes to get an idea of where to start.

have fun
--
Binh Ly
Brickhouse Data Systems, Inc.
http://www.brickhouse.com
Dan Hughes wrote in message <79sni8$dh...@forums.borland.com>...

0 new messages