[DUG] Returning IDispatch instead of OleVariant in TypeLibrary
Conor Boyd
Conor.Boyd at trimble.co.nz
Fri Jun 2 10:26:10 NZST 2006
I'm not sure if this is your issue or not, but...
I'd mentioned in my original "buggy type library" response the
following:
* Under Tools, Options, set the Type Library language to Pascal,
not IDL.
* Under Tools, Options, set the SafeCall function mapping to All
v-table interfaces.
You may also need to look at some of the items on the Flags tab in the
Type Library editor for the interface/method you're working with.
You could look at those settings, and see if they affect what you're
trying to do.
Cheers,
C.
-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz]
On Behalf Of Phil Middlemiss
I notice in the .pas files for M$ Automation objects (Server tab) such
as Word etc. that the interfaces return IDispatch.
I can't seem to get my type library to return anything but OleVariant by
defining a return parameter of VARIANT *. If I try and set it to the
actual dispinterface that *is* returned, I get an error message saying
it must return a type of pointer (even when I stick the * on the end of
it). Same if I try and set it to IDispatch.
Is there some trick here?
More information about the Delphi
mailing list