I am writing a class that will serve as an IE WebBrowser container, and which is also going to be implementing the IDispatch interface, so some of its methods have DispID attributes:
public class IEContainer :
IOleClientSite,
IOleInPlaceSite
{
...
[DispId(HTMLDispIDs.DISPID_AMBIENT_DLCONTROL)]
public int Idispatch_AmbiantDlControl()
{
return (int)m_nFlags;
}
...
}
This works fine and the method Idispatch_AmbiantDlControl gets called only when the class is "public". If I declare it "internal", the IDispatch calls are no longer received. Can someone explain why? Any way around it? I don't want this class to be publicly accessible.
Thanks in advance.