EventNoticeRegisterEx()

Registers a third party handler to receive callbacks when the user takes an action on an open compose view that would result in the message being sent, saved, or closed. Note that this function is different from EventNoticeRegister() in the callback function must support a third parameter which after a successful send will contain the message ID of the message in the database.

Token ID

AFTKN_EN_REGISTER_EX or 944

Syntax

DWORD EventNoticeRegisterEX(
    ANSISTRING DLLPath; 
    ANSISTRING FunctionName;
    DWORD RegisteredID;
    DWORD Flags)

Parameters

DLLPath As ANSISTRING

Text. Fully qualified file name to a dll/exe containing the function to call when an event occurs.

FunctionName As ANSISTRING

Text. Name of the exported function to call. The function should adhere to the following specifications:

HRESULT_stdcall (DWORD dwId, DWORD dwNotifyType, char *pMsgId);

  • dwId - The RegisteredID that is passed into EventNoticeRegisterEx().

  • dwNotifyType - Will be one of the following:

    • 0x00000001 EVT_GROUPWISE_SEND_ITEM
    • 0x00000002 EVT_GROUPWISE_CANCEL_ITEM
    • 0x00000004 EVT_GROUPWISE_CLOSE_ITEM
    • 0x00000008 EVT_GROUPWISE_PACKAGING_ITEM
    • 0x00000010 EVT_GROUPWISE_PACKAGING_ITEM_CANCELED
    • 0x00000020 EVT_GROUPWISE_SEND_ITEM_COMPLETED
  • pMsgId - The GroupWise message ID of the message that was just created. This parameter is only non-null for the EVT_GROUPWISE_SEND_ITEM_COMPLETED notification.

RegisteredID As WORD

A 32-bit ID value that will be passed to the function specified in DLLPath and FunctionName. This provides some flexibility since a pointer or handle can be passed to the memory where the function is handled.

Flags As WORD

The events you want notification for. The following are valid events:

  • 0x00000001 EVT_GROUPWISE_SEND_ITEM
  • 0x00000002 EVT_GROUPWISE_CANCEL_ITEM
  • 0x00000004 EVT_GROUPWISE_CLOSE_ITEM
  • 0x00000008 EVT_GROUPWISE_PACKAGING_ITEM
  • 0x00000010 EVT_GROUPWISE_PACKAGING_ITEM_CANCELED
  • 0x00000020 EVT_GROUPWISE_SEND_ITEM_COMPLETED

Return Values

Returns a DWORD containing a handle that must be passed to EventNoticeUnregistered() in order to free up memory that was allocated for the event tracking.