close

The job of one of our projects was MS Exchange trainer for process inbound email.

The serious root of acquaintance was this nonfiction "Developing Managed Event Sinks/Hooks for Exchange Server Store using C#" by Logu Krishnan, published to the computer code [http://www.codeproject.com/csharp/CsManagedEventSinksHooks.asp], and as well examples from Microsoft Exchange SDK.

We utilised Synchronous Events and created the handler, which fires on OnSyncSave happening. The trainer creates amusement diary in Microsoft CRM and then removes the phone call in the Exchange information until that time the commitment:

Post ads:
free call recorder c6 / hidden icons iphone 4 / zoom h4n mobile 4-track recorder / call recorder software blackberry bold / audio surveillance ip / the cheating boyfriend test / free nokia 7210 call recorder software / mobile video recording equipment / has access my phone records / how to catch him cheating free / blackberry 9500 call recorder / no saints cheating / new vegas bugging lucky 38 / record calls iphone / bluetooth spy mobile download / my girlfriend has been cheating me

public null and void OnSyncSave(IExStoreEventInfo pEventInfo, lead 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:
callrecorder v1.0.37 / if you suspect your man is cheating / internet usage monitoring sbs 2003 / home security camera wireless monitor / st augustine record phone number / home phone records / what is keystroke spy / forward voicemail verizon / can infidelity help marriage / stop cell phone tap / object tracking surveillance / how can we record the conversation over mobile / recording spy camera / body language people having affairs / home security listening devices / atlantic records phone number

}

catch (Exception ex) {

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

}

finally {

LogManager.Shutdown();

}
}

For Exchange handlers debugging - it is the surprisingly handy to use set-up log4net in RollingLogFileAppender or RemoteAppender modes (for sevenfold occurrence of COM objects). You can read more on this matter here
To let the handler succeeding post removal, it is needed to donate proper rights to the user, lower than which picture the COM entry runs the animal trainer. These are rights on transfer of the data in user's boxes for whom it is registered (Windows 2003 Server: Active Directory Users and Computer -> Users -> Properties (for COM application statement) -> Exchange Advanced -> Mailbox Rights). And now the code:

private negated 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, phoney);

rec.Close();

oCn.Close();

rec = null;

oCn = null;

}

catch (Exception ex) {

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

}
}

Happy customizing!
Boris Makushkin

arrow
arrow
    全站熱搜

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