[DUG] Returning IDispatch instead of OleVariant in TypeLibrary
Phil Middlemiss
phil at tumonz.co.nz
Fri Jun 2 10:40:50 NZST 2006
Yes, that's done the trick - thanks. I missed it the first time you
mentioned it cause I was so caught up in trying to just get the thing
reloading without errors.
I can now set the return value of a method to one of my dispInterfaces.
Is this a good idea or should I just return an IDispInterface (concerned
about cross language compatibility)?
Cheers,
Phil.
Conor Boyd wrote:
> 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?
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phil.vcf
Type: text/x-vcard
Size: 250 bytes
Desc: not available
Url : http://ns3.123.co.nz/pipermail/delphi/attachments/20060602/0986571a/phil.vcf
More information about the Delphi
mailing list