IIS and SMTP - Problem met with while implementing SMTP event sink with C#

This is Interesting: Free IT Magazines  
Home > Archive > IIS and SMTP > January 2006 > Problem met with while implementing SMTP event sink with C#





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem met with while implementing SMTP event sink with C#
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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com