Hi there.
A method of my implementation of a COM interface takes an interface as
parameter, which I never use. I could save the code for the definition of
that interface, but what would be a substitute for that parameter ?? Maybe
IntPtr ??
Thanks
Daniel
> A method of my implementation of a COM interface takes an interface
> as parameter, which I never use. I could save the code for the
> definition of that interface, but what would be a substitute for
> that parameter ?? Maybe IntPtr ??
I suppose "Object" would be more adequate.
David Stucki [MS] - 25 Aug 2003 23:12 GMT
If you use Object you want to use the [MarshalAs(UnmanagedType.Interface)]
or [MarshalAs(UnmanagedType.IUnknown)] otherwise the framework will
interpret that parameter as a VARIANT which would be incorrect. IntPtr
will also work just fine. If you're not going to use this IntPtr would be
the quick and easy way to go.
David Stucki
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.