Hello,

I'm trying to capture the OnDelivery event for my custom message class,
but I'm running into some problems
Basically, I'm trying to notify the user whenever a mail of class
GW.MESSAGE.MAIL.CustomMail arrives.

For GW.MESSAGE.MAIL message class I could capture the event, but for
GW.MESSAGE.MAIL.CustomMail it doesn't seem to trigger
Note: GW Client is 7.0


Here are some code snippets (the c3po is written in c#)

//EventMonitors.cs

....

private const string eGW_CMDEVTID_DELIVERY = "GW#E#1";

....

public void Notify(ref string sGWContext, ref object objGWEvent)
{
IGWEvent gwEvent = (IGWEvent)objGWEvent;
switch (gwEvent.PersistentID)
{
...
//Check for Delivery Event
case eGW_CMDEVTID_DELIVERY:
{
MessageBox.Show(gwEvent.PersistentID, sGWContext,
MessageBoxButtons.OK);
}
break;
...
}
}

//CustomMail.cs

public const string MESSAGE_CONTEXT = "GW.MESSAGE.MAIL.CustomMail";
public const string eGW_CMDID_OPEN = "GW#C#OPEN";

....

public static void RegC3po()
{
...
sServerKey =
String.Format("SOFTWARE\\Novell\\GroupWise\\5.0\\C 3PO\\DataTypes\\{0}\\CustomMail.C3POServer",
MESSAGE_CONTEXT);
serverKey = rk.CreateSubKey(sServerKey);

if (serverKey != null)
{
using (RegistryKey
testObject = serverKey.CreateSubKey("Objects"),
testEvent = serverKey.CreateSubKey("Events"))
{
testObject.SetValue("IconFactory", "");
testObject.SetValue("CommandFactory", "");
testObject.SetValue("EventMonitor", "");

testEvent.SetValue(eGW_CMDID_OPEN, "");
testEvent.SetValue("OnDelivery", "");
}
}
...
}


SO, if I have the following reg keys, the message from Notify shows just
fine when a new mail(GW.MESSAGE.MAIL) arrives:

[HKEY_LOCAL_MACHINE\SOFTWARE\Novell\GroupWise\5.0\C 3PO\DataTypes\GW.MESSAGE.MAIL\CustomMail.C3POServe r\Events]
"OnDelivery"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Novell\GroupWise\5.0\C 3PO\DataTypes\GW.MESSAGE.MAIL\CustomMail.C3POServe r\Objects]
"EventMonitor"=""


But if instead, I have the following keys, nothing happens:


[HKEY_LOCAL_MACHINE\SOFTWARE\Novell\GroupWise\5.0\C 3PO\DataTypes\GW.MESSAGE.MAIL.CustomMail\CustomMai l.C3POServer\Events]
"OnDelivery"=""
"GW#C#OPEN"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Novell\GroupWise\5.0\C 3PO\DataTypes\GW.MESSAGE.MAIL.CustomMail\CustomMai l.C3POServer\Objects]
"EventMonitor"=""
"IconFactory"=""
"CommandFactory"=""

I was expecting the message box to show when a message with message
class GW.MESSAGE.MAIL.CustomMail arrives.
IconFactory works fine for my message class, so does the Open command.
I also noticed, if I use the OnOverflow event, I will receive the
notification for the new message:

[HKEY_LOCAL_MACHINE\SOFTWARE\Novell\GroupWise\5.0\C 3PO\DataTypes\GW.CLIENT\CustomMail.C3POServer\Even ts]
"OnOverflow"=""

but the sGWContext I receive is "GW.CLIENT", so I can't tell if this
triggers only when a GW.MESSAGE.MAIL.CustomMail arrives


What is the correct approach for what I'm trying to do?