0
我正在为某人运行Windows 2003服务器工作。他们希望我制作一个SMTP接收器,它可以对我们想要发送消息的数据库和表进行分类。它们在此服务器上没有交换,只有默认的虚拟SMTP服务器。C#ComVisible DLL没有注册
我做了一个类,我认为应该在SMTP服务器onarrival事件发生时触发。然而,当我运行RegAsm/regfile时,我遇到注册我的类的问题,我收到了“Warning,RA0000:没有注册会发生,没有注册类型。”如果我使用/ TLB运行RegAsm,它会告诉我类型已被注册,但是类不会在全局注册表中显示,并且当邮件发送到服务器时不会调用我的类。对于我做错了什么,我有点不知所措。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace SMTPSink
{
[Guid("????-????-?????-????")]
[ComVisible(true)]
[ProgId("SMTPSINK")]
public class SMTPSink : CDO.ISMTPOnArrival
{
SMTPSink()
{ }
void CDO.ISMTPOnArrival.OnArrival(CDO.Message Message, ref CDO.CdoEventStatus EStatus)
{
//Simple test to see if this fires on mail arrival
}
}
}
这工作,我不明白为什么。非常感谢你。 – AlexLordThorsen