Re: Help in Exodus Plugin creation in C#

Joe Hildebrand <joe-bvCY4hpNeH/[email protected]> Sun, 27 Nov 2005 17:13:07 -0700
Newsgroups gmane.network.jabber.exodus.user
Message-ID <[email protected]>
If you use the head of subversion, you'll find this a *lot* easier.   
Here is the procedure:

- Put your .dll anywhere.  Eventually, if you put it in Exodus/ 
plugins/net or something, this will get more automated, but for the  
moment it doesn't matter
- Make sure to call regasm on the .dll
- Put a registry value at HKCU\Software\Jabber\Exodus\Plugins whose  
name is the progid of your control, and whose value is a string that  
describes the plugin.
- If you don't have the head of SVN, edit your preference file, and  
add your progid to the plugin_selected preference.  It's a  
stringList, so each item has an <s> around it.
- If you *do* have the head of SVN, your plugin will just show up in  
the list and can be selected.

You'll no longer have to try to get the .TLB into the .dll, which is  
nice.  The downside is that you'll have to figure out (for the  
moment) how to get your users to call regasm on your .dll to install  
it.  Eventually I'll figure out how to determine which CLR version  
you compiled with, find the correct version of regasm, and run it  
automatically.

I've also got a .Net base class that does all of the registry stuff  
automatically.  I'll try to remember to post it when I'm back in the  
office on Monday.

On Nov 22, 2005, at 8:19 PM, Durga Prasad wrote:

>  hi All,
>
> I want to write a Plugin for Exodus Client using C#.  For testing  
> purpose, I wrote main class which implements IExodusPlugin  
> interface that will add a Menu Item if the user clicks on a Roster  
> name.
>
> The following is the structure of the Main Class ::
>
> using System;
> using System.Runtime.InteropServices;
>
> namespace ExodusPluginTesting
> {
>     /// <summary>
>     /// Summary description for Class1.
>     /// </summary>
>
>     [ Guid("E10C6CDE-8D8B-46c2-AE85-0185039E9958") ]
>     [ClassInterface(ClassInterfaceType.AutoDual)]
>     public class ExodusPluginTesting : Exodus.IExodusPlugin
>     {
>         public string ID = "";
>         Exodus.ExodusController exodusController;
>
>         public void Startup(Exodus.ExodusController exController)
>         {
>             string s = "This is my Plugin";
>             exodusController =
>                 (Exodus.ExodusController) exController;
>             ID = exodusController.addContactMenu(s);
>         }
>
>         public  void Shutdown()
>         {
>             exodusController.removeContactMenu(ID);
>             exodusController = null;
>         }
>
>         public void Process(string xpath, string eventRaised,  
> string xmlObject)
>         {
>         }
>
>         public void NewChat(string jID, Exodus.ExodusChat exodusChat)
>         {
>         }
>
>         public void NewRoom(string jID, Exodus.ExodusChat Room)
>         {
>         }
>
>         public  string NewIM(string jID, ref string body, ref  
> string subject, string xTags)
>         {
>             string k = " " ;
>             return (k);
>         }
>
>         public void Configure()
>         {
>         }
>
>         public void MenuClick(string ID)
>         {
>         }
>
>         public void MsgMenuClick(string ID,string jID, ref string   
> body,ref string subject)
>         {
>         }
>
>         public void NewOutgoingIM(string jID, Exodus.ExodusChat  
> instantMSG)
>         {
>         }
>     }
> }
>
>
> I converted "Exodus.tlb" to "Exodus.dll" using "tlbImp.exe" tool.   
> And I included this 'Exodus.dll' in my code to import the  
> "IExodusPlugin" interface structure into the Main Class   
> (ExodusPluginTesting()).
> I built the solution (with Component Registry).  THE OUTPUT files I  
> got is "ExodusPluginTesting.dll" and "ExodusPluginTesting.tlb".
>
>
> Then I placed the 'ExodusPluginTesting.dll' file in "C:\Program  
> Files\Exodus\Plugins" directory.  I started Exodus client.  But I  
> didn't view the PLUGIN in the LIST.  I tried several builds and  
> placed it in PLUGINS directory, still, I didn't find it in the list.
>
>
> Is my Interface implementation correct or shall I need to declare  
> the interface structure also (without using Exodus.dll).
>
> Can anybody help me in this aspect what procedure to follow to  
> create .DLL Plugin for EXODUS.
>
>
>
> Thanks,
> Durga Prsad T
>
> Win a Yahoo! Vespa NEW - Yahoo! Cars has 3 Vespa LX125s to be won  
> Enter Now!
> _______________________________________________
> Exodus mailing list
> [email protected]
> http://mail.jabber.org/mailman/listinfo/exodus

_______________________________________________
Exodus mailing list
[email protected]
http://mail.jabber.org/mailman/listinfo/exodus
smime.p7s (application/pkcs7-signature, 2.1 KB) - not displayed