What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Sorry if this has been asked...

Pages: (3): « First « 1 [ 2 ] 3 » Last »
Sorry if this has been asked...
Author: Message:
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: Sorry if this has been asked...
Music Logger Plus has been written in C#.NET, except some errors after installing it, it does work, but... As far as I know you can only use 1 C#.NET (and probably VB.NET, those are almost the same) plugin in the same time. When installing the second .NET plugin it doesn't work. So when testing, uncheck all the other plugins in your plugin list to make sure that isn't the problem.

Patchou, I think it is a kind of bug in MsgPlus. For the record, I do use the Interop.MessengerAPI.dll.

When registering it with regasm /codebase "path/to/my/plugin" (and the plugin isn't in the plugins dir) it does work, but as I said only 1 plugin a time.

When it is in the plugins dir it does work the same, but when starting messenger for the first time you get an error, so you have to restart messenger (the error about 2 copies of mscoree.dll loaded ...). That's what also happens with Music Logger Plus!
10-04-2005 07:13 PM
Profile E-Mail PM Find Quote Report
frak
New Member
*

Avatar
I didn't do it!

Posts: 9
– / Male / –
Joined: Oct 2005
O.P. RE: Sorry if this has been asked...
quote:
regasm /codebase

Hmmm, I was just using /s - dont tell me this is what I have been doing wrong...

As for other plugins, I dont have any other plugins installed - heresy, I know, but they dont do what I want them too ;o)
10-04-2005 07:30 PM
Profile PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: Sorry if this has been asked...
That may indeed be the problem. I've tested and regasm /codebase turned out to be the best way. And as I said before, the plugin doesn't need to be in the plugins dir, because with the codebase option the full path to the plugin is registered(Y)
10-04-2005 07:32 PM
Profile E-Mail PM Find Quote Report
KokiriChild
New Member
*

Avatar
FFXI Rules my life

Posts: 5
40 / Male / –
Joined: Oct 2005
RE: RE: Sorry if this has been asked...
quote:
Originally posted by frak
KokiriChild:

Do you know of any plugin authors who have succeeded?


Uhm, no, sorry, we're all VB6 around here, and my plugin would work if it wasn't for the little DisplayToast() problem [link] 8-)

- KokiriChild
10-04-2005 07:48 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Sorry if this has been asked...
quote:
Originally posted by frak
I guess what this is teaching me is to give up on VB.NET - I should have known after all the heartache VB 6 has given me over the years.  Is VB6 going to be an easier bet?
VB6 is extremely easy for making a plugin...

quote:
Originally posted by frak
Or should I go for the steep curve and choose c++?
It has of course some advantages over VB6, like you don't have to register your plugin anymore...

quote:
Originally posted by KokiriChild
Uhm, no, sorry, we're all VB6 around here
'We' are certainly not all VB6 around here. Many people on this forum program in C++, Delphi, VB, Java, etc... And plugins have been created in C++, VB, VB.NET, C#, Dev-C++, and there are even frameworks for VBScript and JavaScript...
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-05-2005 04:15 PM
Profile PM Find Quote Report
KokiriChild
New Member
*

Avatar
FFXI Rules my life

Posts: 5
40 / Male / –
Joined: Oct 2005
RE: Sorry if this has been asked...
quote:
'We' are certainly not all VB6 around here

Sorry! I meant 'we' as in 'we who live in this house', not 'we who post on this forum', apologise for any confusion there, and I think Patchou would slap my VB6 butt with his C++ Libraries if I meant he was a VB programmer too ;)

- KokiriChild
10-05-2005 06:05 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Sorry if this has been asked...
quote:
Originally posted by J-Thread
As far as I know you can only use 1 C#.NET (and probably VB.NET, those are almost the same) plugin in the same time.
I think I can explain why.
When Plus! loads a .NET plugin, it loads MSCOREE.DLL into the process space. When it tries to load the next .NET plugin, it loads MSCOREE.DLL again. However, there's something in MSCOREE.DLL that prevents two copies being loaded at the same time.

If this is true, it doesn't make sense to me: I thought only one copy of a DLL was loaded into the process space anyway, no matter how many (explicit/implicit) calls to LoadLibrary() there are.
[Image: spartaafk.png]
10-06-2005 12:59 PM
Profile PM Web Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: Sorry if this has been asked...
Yes I thougt of that too...

I did send Patchou an email about it yesterday, so we'll wait for his answer... I hope he can improve plus, or tell us what the right way is to install .NET plugins. We'll see(Y)
10-06-2005 04:17 PM
Profile E-Mail PM Find Quote Report
frak
New Member
*

Avatar
I didn't do it!

Posts: 9
– / Male / –
Joined: Oct 2005
O.P. RE: Sorry if this has been asked...
Unfortunately despite my best efforts I am unable to get any kind of code working using VB.NET - even using the /codebase option (are those warnings normal?)

Thanks for your help anyway guys - I think I may try C++ as I have slightly masochistic tendencies ;o)
Well, having done exactly what I said I wouldn't, I have stuck with trying to nail down what is going wrong with my VB.NET plugin, please consider the following Initialise function

code:
    Public Function Initialize(ByVal nVersion As Integer, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
        MsgBox(sAppName + "::Initialise called!", MsgBoxStyle.OKOnly, "DEBUG")
        MyPlugin.oMessenger = oMessenger
        MsgBox(sAppName + "::Initialise - Got Messenger ref", MsgBoxStyle.OKOnly, "DEBUG")
        Initialize = True
    End Function


There are other things, such as dimming vars and some set-up that I have removed for simplicity, and testing.  Now, when I start Messenger I get the first MsgBox, but not the second.  I have declared my oMessenger as follows:
code:
    Public Shared WithEvents oMessenger As MessengerAPI.Messenger


Although the sample has this as MessengerClass, I changed this because of the code I found in this thread but neither have made any difference - if I try to get a reference to the running Messenger instance, then my function doesn't get past this point.

Any ideas?
10-07-2005 04:45 PM
Profile PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: Sorry if this has been asked...
When you want to use the messengerapi there are some things to do.

-First, add Interop.MessengerAPI as a reference to your project.
-Build your project
-Copy your dll to a dir where you gonna install it
-Copy the Interop.MessengerAPI.dll (which will be in your build dir) to the SAME map as your plugin
-Register your plugin using the codebase option
-Add your plugin name to the msg plus registry key

The reason you only see the first msgbox is, as soon as you try to use the messenger api an error appears and your plugin is closed. When you try it as i destribed above it should work.

This post was edited on 10-07-2005 at 07:38 PM by J-Thread.
10-07-2005 06:34 PM
Profile E-Mail PM Find Quote Report
Pages: (3): « First « 1 [ 2 ] 3 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On