The intention of one of our projects was MS Exchange animal trainer for processing next email.

The rough well of know-how was this nonfictional prose "Developing Managed Event Sinks/Hooks for Exchange Server Store using C#" by Logu Krishnan, published to the computer address [http://www.codeproject.com/csharp/CsManagedEventSinksHooks.asp], and likewise examples from Microsoft Exchange SDK.

We utilised Synchronous Events and created the handler, which fires on OnSyncSave case. The animal trainer creates pursuit dictation in Microsoft CRM and after removes the phone call in the Exchange database back the commitment:

Post ads:
micro spy remote manual / cheating hearts by deborah carr / login to skype / how to catch a cheating long distance girlfriend / quiz is my husband cheating on me / surveillance jobs east midlands / my husband is cheating do i confront him / nintendo cheating device / vandalia rec phone number / new software for mobiles / iphone spy software 5.1.1 / how to spy ym conversation / tips on how to catch a cheating boyfriend / spy logger mac / do know my girlfriend cheating / cheated on wife feel guilty

public cancelled OnSyncSave(IExStoreEventInfo pEventInfo, string bstrURLItem, int IFlags) {
try {
if (IFlags == ((int)EVT_SINK_FLAGS.EVT_SYNC_COMMITTED (int)EVT_SINK_FLAGS.EVT_IS_DELIVERED)) {

ProcessMessage(pEventInfo, bstrURLItem, IFlags);

}

Post ads:
mobile spy voice recorder / mobile phone detective / free cell phone spyware downloads / recorded time phone number / download free hacking softwares for mobiles / spy boys jerking / listening device npf_genericdialupadapter / monitoring cell change excel / free cell phone spyware online / phone to tape recorder / spy catch cheating husband / blackberry 9000 call recording / mobile data monitoring application kaskus / neo call maroc / gsm spy microphone / detective agency 2 banker's wife cheats

}

catch (Exception ex) {

log.Debug(ex.Message "\\n" ex.StackTrace);

}

finally {

LogManager.Shutdown();

}
}

For Exchange handlers debugging - it is the really expedient to use rules log4net in RollingLogFileAppender or RemoteAppender modes (for dual natural event of COM objects). You can publication more than on this premise present
To allow the handler arriving message removal, it is requisite to impart straight-laced rights to the user, low which vindication the COM application runs the animal trainer. These are rights on relocate of the figures in user's boxes for whom it is registered (Windows 2003 Server: Active Directory Users and Computer -> Users -> Properties (for COM candidature statement) -> Exchange Advanced -> Mailbox Rights). And now the code:

private blankness DeleteMessage(string bstrURLItem) {
try {

ADODB.Connection oCn = new ADODB.Connection();

oCn.Provider = "exoledb.datasource";

oCn.Open(bstrURLItem, "", "", -1);

if(oCn.State == 1) {

log.Debug("Good Connection");

}

else {

log.Debug("Bad Connection");

}

ADODB.Record rec = new ADODB.Record();

rec.Open(bstrURLItem, oCn,

ADODB.ConnectModeEnum.adModeReadWrite,

ADODB.RecordCreateOptionsEnum.adFailIfNotExists,

ADODB.RecordOpenOptionsEnum.adOpenSource,

"", "");

rec.DeleteRecord(bstrURLItem, hollow);

rec.Close();

oCn.Close();

rec = null;

oCn = null;

}

catch (Exception ex) {

log.Debug(ex.Message "\\n" ex.StackTrace);

}
}

Happy customizing!
Boris Makushkin

sloanq1 發表在 痞客邦 PIXNET 留言(0) 人氣()