| Gavin Lu 2006-01-05, 6:07 pm |
| Hi guys,
Thi's a question about export CDO & SEO type lib to .Net assembly.
I'm a new guy to .Net interop with COM, but I've to make a program to
implement an event sink by C#, working with SMTP virtual server. I
exported seo.dll & cdosys.dll type libs to C# dev environment by tlbimp
/keyfile: command line & GUI operations, but I got two twisted
interfaces:
public abstract new void OnArrival ( CDO.Message Msg ,
CDO.CdoEventStatus EventStatus )
public abstract new void IsCacheable ( )
In C++ APIs of COM, they're actually:
STDMETHOD(OnArrival)(IMessage * Msg, CdoEventStatus * EventStatus)
STDMETHOD(IsCacheable)
There's no STDMETHOD defined in C#, and I can't define
public class Class1 : ISMTPOnArrival, IEventIsCacheable
{
public override void OnArrival(CDO.Message Msg , CDO.CdoEventStatus
EventStatus )
public override void IsCacheable()
}
to override them, because the compiler told me "no suitable method
found to override".
Does anyone know what's the problem? I tried to remove "override",
compiled but it didn't work. I think in this way, I defined two new
methods so not overriding the virtual ones.
But how to do so? Thanks.
-Gavin
|