SMTP Transport event sink problem (Exchange 2000)
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
SMTP Transport event sink problem (Exchange 2000)

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Eric Lajeunesse
Guest





Posted: Mon Sep 12, 2005 11:53 pm    Post subject: SMTP Transport event sink problem (Exchange 2000) Reply with quote

Hi all,

I'm working with a transport event sink for a while and now my sink is
working find when I register it and don't restart my the computer all goes
well, I process all incoming and outgoing email normally.

The problem arise when I restart my computer. When the computer is
restarting, my sink is already registred in the Seo database so when there is
some incoming or outcoming email the InetInfo process create automaticaly an
instance of my event sink class and my DLL is loaded in the proccess
InetInfo. After the constructor, the event sink dispather call my
OnMessageSubmission function and I process the email and return normally.
This is the normal and supossed way that should always work. Nevertheless,
when restarting the computer, sometimes two instances of my COM class is
created and make my aplication crashhh :( .. and I really don't figure why
this happen. I don't understand why the dispacher is trying to construct two
instances of my COM class.

any helps will be apreciate

Eric

Back to top
cho
Guest





Posted: Thu Sep 15, 2005 12:28 am    Post subject: Re: SMTP Transport event sink problem (Exchange 2000) Reply with quote

You need to implement IsCachable() function so that only one sink
instance will be created.

The Technical articals: Microsoft Windows 2000 SMTP Service Events has
the following explaination about IsCachable():
If implemented, this indicates to the dispatcher that it can call your
sink multiple times in a row without having to tear it down. If not
defined, the sink instance is deleted after exit. If this method is not
implemented, indicating that the sink must not be called multiple
times, CoCreateInstance( ) must be called for each event raised which
will reduce performance. In order to implement this, the sink must be
re-entrant/thread-safe. There can be no shared data without proper
locking. This method can be implemented by both transport events and
protocol events.
Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
Contact Us
New Topics Powered by phpBB