C# .net plugin - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: C# .net plugin (/showthread.php?tid=52568)
C# .net plugin by n0n4m3 on 11-03-2005 at 07:26 AM
Hello,
I decided to create a plugin for msgplus in c#/.net but I'm having some difficulties interfacing with the messenger api. I searched this and other foruns and didn't find the answer.
I don't have the file Interop.MessengerAPI.dll which is referred in other thread (I only have two messenger COM references in visual studio which are: messenger content installer and messenger file transfer plus library.)
Maybe it's because I don't have windows messenger 4.7 installed (just guessing, but if this is the case, how can I use messenger api 7, or there isn't any messenger api 7? a bit confused here).
I'm using:
- dannyres c# framework http://shoutbox.menthix.net/attachment.php?pid=259848 (nice work!)
- msn messenger 7.5.0
- msgplus 3.61.145
Thanks,
Ricardo Sabino.
RE: C# .net plugin by J-Thread on 11-03-2005 at 03:05 PM
In visual studio, right click references -> Add...
Go to the tab COM, then search in the list for "Messenger API Type Library".
If that isn't in the list, you schould indeed install windows messenger
RE: C# .net plugin by n0n4m3 on 11-03-2005 at 05:15 PM
Thanks, I was missing windows messenger
I had other problem when using the MessengerAPI but I already solved it. You should include it in your tutorial: http://shoutbox.menthix.net/showthread.php?tid=50578
When compiling a project using the MessengerAPI, it may give the error:
error CS1577: Assembly generation failed -- Referenced assembly 'Interop.MessengerAPI' does not have a strong name
To solve this the line in the AssemblyInfo.cs:
[assembly: AssemblyKeyFile("..\\..\\keyfile.snk")]
isn't enough, so, we have to go to:
- Project Properties > Common Properties > General > Wrapper Assembly Key File
and add our strong name key file: keyfile.snk
RE: C# .net plugin by J-Thread on 11-03-2005 at 06:01 PM
Your right about that!
I'll update my other post
RE: C# .net plugin by Jedimark on 11-03-2005 at 06:02 PM
What are you working on n0n4m3.
You should also know that it seems you can only have one C# plugin running at once.
RE: RE: C# .net plugin by J-Thread on 11-03-2005 at 06:06 PM
quote: Originally posted by Jedimark
You should also know that it seems you can only have one C# plugin running at once.
I may have found the right solution to that, but I have to test that... Haven't got much time, but I'll discuss it with you on MSN. At least I have been able to run 2 .NET plugins at the same time...
RE: RE: RE: C# .net plugin by n0n4m3 on 11-03-2005 at 06:26 PM
quote: Originally posted by J-Thread
quote: Originally posted by Jedimark
You should also know that it seems you can only have one C# plugin running at once.
I may have found the right solution to that, but I have to test that... Haven't got much time, but I'll discuss it with you on MSN. At least I have been able to run 2 .NET plugins at the same time...
Hummm.. didn't know that
Still new in this thing
I have other two questions that are making me a bit frustrated
- How do you debug in C#?
- How do you reload a plugin? (if the dll is being used we can't replace it with a new version or is there a way to disable a plugin without restarting msn?)
quote: Originally posted by Jedimark
What are you working on n0n4m3.
Just a simple thing to create "groups" so you can have multiple "invisible lists" (it would work blocking contacts that weren't in the list). Something like: /xSetVisible group (it would block all except this group) and /xSetInvisible group (it would block this group).
I know that msgplus has /blockgroup but it only works with the groups we have in the contact's list.. i'd like to have more groups than those that appear in my contact's list.
RE: C# .net plugin by J-Thread on 11-03-2005 at 07:30 PM
About the reloading, read this thread...
About the debugging, there isn't really a way to debug... Just build and reload the plugin...
RE: RE: C# .net plugin by n0n4m3 on 11-04-2005 at 03:28 AM
quote: Originally posted by J-Thread
About the reloading, read this thread...
About the debugging, there isn't really a way to debug... Just build and reload the plugin...
I read that thread but I still can't unload the dll from memory.. I ran regasm /u plugin.dll it unregistered it from registry but didn't unload it from msn
RE: C# .net plugin by TazDevil on 11-05-2005 at 09:01 AM
jsut wanted to try the reload on c# plugins...
and i hate the language already...
i was trying to load the default .NET plugin patchou made and after finding the regasm in a god forgoten directory, i finally registr teh plugin
and here is my reward !!!
RE: C# .net plugin by J-Thread on 11-05-2005 at 09:45 AM
It's a well known error... Restart msn again to make it work (or not, but the error is gone) or place the plugin in a different directory and register it.
|