Adding events through a DispInterface has created a problem
I added a DispInterface to my control to accomplish this, thusly:
[Guid("1F98211C-7A71-4588-8D4A-AD85CA80BAE7")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IWvfCtrlCOMEvents
{
[DispId(0x60020000)]
void UploadComplete();
}
///<summary>
///Control with attribute for DispInterface
///</summary>
[ClassInterface(ClassInterfaceType.None), ComSourceInterfaces(typeof(IWvfCtrlCOMEvents))]
public class WvfCtrl3 :System.Windows.Forms.UserControl,IWvfCtrl3
{
...
}
I have created this as a strong assembly:
in AssemblyInfo.cs
[assembly: System.Security.AllowPartiallyTrustedCallers()]
[assembly: AssemblyKeyFile(@"..\..\client.snk")]
And I have done a Regasm /tlb to register the DispInterface.
But I'm getting an MSIE alert when I call one of my methods on my default interface, when I'm not raising an event. If I don't have the DispInterface as a ClassInterface, it works fine.
As far as I can tell, this is running under the Local Intranet zone.
What am I missing?
Thanks,
Buzzby

