Extension manager callback question

I’d just like confirmation on the way I think this works. Upon reading through the C API Notes/Domino reference, they talk about callbacks. For instance, there’s the NSFNoteUpdateMailboxEMCallback. It states this function is only available as an Extension Manager callback and cannot be called directly. If I understand this correctly, in order to use this callback, I would need to register EM_NSFNOTEUPDATEMAILBOX and write a function called NSFNoteUpdateMailboxEMCallback that performs what I want to happen when an NSFNoteUpdate is performed on any mailbox database. Can someone confirm whether or not my assumptions are correct?

Subject: Extension manager callback question

You wouldn’t really need to write such a function, simply understand that the arguments to the NSFNoteUpdateMailboxEMCallback is what you can expect to see. I use this as a guide to figure out which arguments to retrieve with VAR_ARGS.

Subject: RE: Extension manager callback question

Hmmm, ok, I guess. So let me get even more specific. I want to be notified whenever someone sends an email. I think this is done by registering EM_NSFNOTEUPDATEMAILBOX. Am I correct so far?

Then, when someone sends an email, that will cause a NSFNoteUpdate to be performed on a mail.box. Now, according to what you state and what is in the documentation , I can then retrieve the handle of the note that is being sent as well as the update flags by somehow using this thing called VAR_ARGS. Is that correct? How is VAR_ARGS used in this manner?

Subject: RE: Extension manager callback question

why don’t you just use the inbuilt message tracking facility instead?

apart from that, essentially correct

you write a c-api add-in in which you register which EM’s you want to be notified about, you also pass a function you wish to be called when the event is triggered.

when the event you want is triggered your fucntion is called, you do some basic status checks and then you pull the event’s arguments off a stack using VARARG

then you do whatever you want your code to do.