Re: IDispatch definition in C#



Phil,

>t seems to me unnecessarily hiding
>information about the variable's type.

Unless you're going to use any type specific functionality (ie
IDispatch methods) I don't see that as a problem.


> OK, I'm not trying to start a deep philosophy discussion. It just seems
>strange that Microsoft would thoughtfully prevent the definition of its core
>interfaces from being visible to .NET class designers.

They don't prevent it, you can declare and use IDispatch if you really
have a reason to. If you do, the field declaration becomes

private IDispatch m_Server;

(not IDispatch*).


Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
.



Relevant Pages

  • Re: Problems with IDispatchImpl
    ... you have your own dual interface defined in another type library. ... You have to check if this IApplication is indeed a dual interface. ... IDispatch by hand (based on your previous post, ... > The IDispatch methods are indeed implemented by IDispatchImpl, ...
    (microsoft.public.vc.atl)
  • Problems with IDispatchImpl
    ... except IDispatch calls (I simply done dummy ... implemenation of the IDispatch methods), besides,I thought I should do it ... I thought these methods are implemented by the IDispatchImpl template class. ... STDMETHOD(UINT itinfo, LCID lcid, ITypeInfo** pptinfo) ...
    (microsoft.public.vc.atl)
  • Re: Problems with IDispatchImpl
    ... The IDispatch methods are indeed implemented by IDispatchImpl, ... If IApplication is essentially as ... You already implement IDispatch through your dual interface (and ...
    (microsoft.public.vc.atl)
  • Re: Callback Interface functions NOT being Called
    ... Try to debug your code by setting a breakpoint in IDispatchImpl on the ... IDispatch methods: GetIdsFromNames and Invoke. ...
    (microsoft.public.office.developer.com.add_ins)