Strange "lFlags" value on a C# global even sink

Strange "lFlags" value on a C# global even sink

Post by b3NjYX » Fri, 14 Jul 2006 11:16:02


Hi All,

I developed a C# synchronous event sink and successfully attached it to the
global system mailbox in Exchange server. However, the "lFlags" argument
passed to OnSyncSave() and OnSyncDelete() of my sink object are strange
because they differ from the values specified in Exchange SDK doc (yes I know
its a bitwise flag).

Example 1
=========
When I save an email titled "test 9" to draft I got following values in
OnSyncSave()

1st OnSyncSave() Call:
url: file://./backofficestorage/dev.local/MBX/test2/Drafts/test 9.EML
flags: EVT_NEW_ITEM, EVT_SYNC_BEGIN, EVT_INITNEW

2nd OnSyncSave() Call:
url: file://./backofficestorage/dev.local/MBX/test2/Drafts/test 9.EML
flags: EVT_NEW_ITEM, EVT_SYNC_COMMITTED

According to the SDK document I should be getting a "EVT_DRAFT_CREATE" in
lFlags.


Example 2
=========
When I delete an email titled "test B" from a custom folder called
"Important" I got following values in OnSyncSave() and OnSyncDelete()

1st OnSyncSave() Call:
url: file://./backofficestorage/dev.local/MBX/test2/Deleted
Items/test B.EML
flags: EVT_NEW_ITEM, EVT_SYNC_BEGIN, EVT_INITNEW

2nd OnSyncSave() Call:
url: file://./backofficestorage/dev.local/MBX/test2/Deleted
Items/test B.EML
flags: EVT_NEW_ITEM, EVT_SYNC_COMMITTED

1st OnSyncDelete() Call:
url: file://./backofficestorage/dev.local/MBX/test2/Important/test
B.EML
flags: EVT_SYNC_BEGIN, EVT_SOFTDELETE, EVT_HARDDELETE, EVT_INITNEW

2nd OnSyncDelete() Call:
url: file://./backofficestorage/dev.local/MBX/test2/Important/test
B.EML
flags: EVT_SYNC_COMMITTED, EVT_SOFTDELETE, EVT_HARDDELETE

As you can see I got _BOTH_ EVT_SOFTDELETE & EVT_HARDDELETE flags set in
lFlags. However, according to the SDK document I should get EVT_SOFTDELETE
only because it is only moved to "Deleted Items"


Example 3
=========
When I delete an email titled "test B" from "Deleted Items" I got asked

"Are you sure that you want to perminatly deletet he selected item(s)?"

I click "Yes" then I got following values in my log

1st OnSyncDelete() Call:
url: file://./backofficestorage/dev.local/MBX/test2/Deleted
Items/test B.EML
flags: EVT_SYNC_BEGIN, EVT_SOFTDELETE, EVT_INITNEW

2st OnSyncDelete() Call:
url: file://./backofficestorage/dev.local/MBX/test2/Deleted
Items/test B.EML
flags: EVT_SYNC_COMMITTED, EVT_SOFTDELETE

Now I got a EVT_SOFTDELETE but should this be EVT_HARDDELETE?


Does anyone know why I got these weird values?
Is it to do with the way I register event sink? or Exchange configurations?


Regards,
Oscar
 
 
 

Strange "lFlags" value on a C# global even sink

Post by Glen Scale » Sun, 16 Jul 2006 09:02:24

Are you running Outlook in Cache mode you might want to try experimenting
between cached and online mode to see if this makes a difference.

Cheers
Glen

 
 
 

Strange "lFlags" value on a C# global even sink

Post by b3NjYX » Tue, 18 Jul 2006 05:59:02

i Glen,

Thank you for your reply. I have tried the online mode out and indeed the
EVT_MOVE event is fired correctly now.

However, I wish I can find out a universal way of detecting these events as
I don't want to force all customers to use online mode.

Are there any way to achieve that?

Cheers,
Oscar



"Glen Scales [MVP]" wrote: