Shoutbox

WLM | MP!L and activeX - 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)
+----- Thread: WLM | MP!L and activeX (/showthread.php?tid=67408)

WLM | MP!L and activeX by r00d on 10-17-2006 at 09:19 AM

Hello,

i'd like to program a plugin for WLM, and maybe MP!L should allow me to do what i'd want to. But i didn't find how to do this.

I would like to replace the avatar picture by an activeX of my own. Is it possible? Is it possible, in fact, to insert an activeX into the WLM window or into the MP!L window? And how?

Thank you for advices.

R.P.


RE: WLM | MP!L and activeX by Felu on 10-17-2006 at 10:18 AM

quote:
Originally posted by MP!L Script Documentation
code:
//Load a VB ActiveXobject
function LoadPlugin_VB(ProgId){
    var PluginObj = new ActiveXObject(ProgId);
    if(PluginObj) {
        if(PluginObj.Initialize(8,"", undefined) == true)
                  Debug.Trace("The VB plugin has been initialized");
     }
}


RE: WLM | MP!L and activeX by r00d on 10-17-2006 at 12:56 PM

Ok, thank you, but have another problem now:

i have made an activeX in C++. So i tried to load it in my script using:

code:
function LoadPlugin_Dll(DllPath)
{
    if(Interop.Call(DllPath, "Initialize", 8, "", 0) == 1)
    {
        Debug.Trace("The C plugin has been initialized");
    }
}

but I receive the following error:

quote:
Interop.Call can't load "C:\temp\mydll.dll"
Error : unknown.
         Line : 26. Code : -2147467259.

What's the problem?
RE: WLM | MP!L and activeX by CookieRevised on 10-17-2006 at 01:50 PM

An activeX object can't be loaded using the interop.call. Use the code provided by -!Felu!-

quote:
Originally posted by r00d
I would like to replace the avatar picture by an activeX of my own. Is it possible? Is it possible, in fact, to insert an activeX into the WLM window or into the MP!L window? And how?
No, that is not possible.

All you can do is overlay the real display picture with a new window you've created which includes the image (or whatever). And each time the user moves the chat window, you should move your window too. You also would need a way to catch window resizes, display pictures hiding/showing, etc...

All in all, this is almost as good as impossible to make it in any decent way.

RE: WLM | MP!L and activeX by r00d on 10-17-2006 at 02:13 PM

hum... sad to read that...
But thank you thousand times for your answer.

But, i wonder... how the WP!L is done? Because nether the Activity SDK, nor the Addin API permit such a stuff. And since you have done different controls (buttons, combos, edit...) why can't we insert an ActiveX ?


RE: WLM | MP!L and activeX by CookieRevised on 10-17-2006 at 02:15 PM

The scripting stuff isn't run within Windows Live Messenger, it is run within Messenger Plus! (though it is in the same process thread), as Messenger Plus! uses the Windows scripting engine.

In other words: scripts are run within the scope of Plus!, not within Windows Live Messenger. The events and such are also provided by Plus!, just as the controls, windows, and other stuff...

this picture might not be 100% correct, but it gives the rough idea:

[Image: attachment.php?pid=743248]


RE: WLM | MP!L and activeX by r00d on 10-17-2006 at 03:00 PM

Ok.

And do you know how MP!L "discuss" with WLM?

[Image: attachment.php?pid=743256]


RE: WLM | MP!L and activeX by CookieRevised on 10-17-2006 at 03:50 PM

quote:
Originally posted by r00d
Ok.

And do you know how MP!L "discuss" with WLM?

[Image: attachment.php?pid=743256]
that's the 1 millon dollar question and which will require a very advanced answer. It is also that which makes Plus! work.

In short and to put it very simple (maybe too simple): it hooks into Messenger.

What hooks are, what the different techniques are and how they work can be found in the msdn library.


PS: but even if you can do exactly what Plus! does, then you still wont be able to replace a display picture with your own ActiveX object either. It doesn't work that way...
RE: WLM | MP!L and activeX by r00d on 10-18-2006 at 02:47 PM

Is the Addin SDK (c#) is used for that?


RE: WLM | MP!L and activeX by CookieRevised on 10-18-2006 at 03:45 PM

No

The Addin SDK or anything else MS has come up with (or will come with) doesn't have anything todo with that.

Plus! uses its own (very advanced) methods to hook itself and do its stuff (it even uses some assembler!).