1

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.

O.T.Vinta
  • 217
  • 1
  • 4

1 Answers1

0

Try changing "public" for "private"

Carlos Morales
  • 1,137
  • 3
  • 15
  • 38