I'm also trying to do it. Translate the other plugins to C# wasn't a problem. I've got this:
code:
using System;
namespace Test
{
public class TestPlugin
{
public TestPlugin()
{
}
public bool Initialize(long nVersion, string sUserEmail, object oMessenger)
{
return true;
}
public bool GetPublishInfo(ref string sPluginNameString, ref long nCommandCount, ref long nTagCount)
{
sPluginNameString = "Test Plugin";
nCommandCount = 1;
nTagCount = 0;
return true;
}
public void GetPublishCommandInfo(long nCommandIdx, ref string sName, ref string sValue, ref string sHelp)
{
if(nCommandIdx == 1)
{
sName = "Test option";
sValue = "xtest";
sHelp = "Some help text";
}
}
public void GetPublishTagInfo(long nTagIdx, ref string sName, ref string sValue)
{
}
public bool ParseCommand(string sCommand, string sCommandArg, object oConversationWnd, ref string sResult)
{
if(sCommand.ToLower() == "/xtest")
{
sResult = "It works! You said: " + sCommandArg;
return true;
}
return false;
}
}
}
But the problem is installing... I can't install it correctly...
I know how to do it but it doesn't work... I first unload the messenger plugins, then I copy the dll to the correct map, after that i write the registry key and then I use RegAsm to register my key. But i keep having errors about having 2 instances of mscoree.dll (or something like that) loaded... And msn crashes. One time it worked when I closed msn first, but that doesn't work all the time. I think the problem is, it takes too long to copy the dll and regasm it, so msgplus has already loaded it... But i'm not quite sure. Anybody has got an idea?