What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects

Pages: (2): « First [ 1 ] 2 » Last »
1 votes - 5 average   Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects
Author: Message:
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
O.P. Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects
Hello everyone!

I've just finished the tutorial on how to let a DLL, which is Interop.Call()ed by scripts, interface with Plus! scripting objects.

This tutorial guides script developers to have their native Win32 DLLs manipulate scripting objects (MsgPlus, Messenger, ChatWnd, Contact, PlusWnd, ...) as in JScript. We know that DLLs are crucial to implement asynchronous callbacks, which are in term crucial to subclassing non-Plus! windows (aside from machine-code-injection). However, before this tutorial, it was never (I think) disclosed how DLLs can interact with scripting objects in their native C++ codes. This is also the very technique that enables HopperLive to change Messenger's status and create a PlusWnd in its DLL.

If you're interested, please take a look! And tell me what you think about it, especially if you feel something is left unsaid, is not clear, or if you want more detail on specific topics. Requests for specific examples are welcome too!

Happy reading!

This post was edited on 03-08-2012 at 09:53 AM by Mnjul.
05-03-2010 04:06 PM
Profile PM Web Find Quote Report
Menthix
forum admin
*******

Avatar

Posts: 5537
Reputation: 102
40 / Male / Flag
Joined: Mar 2002
RE: Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects
Nice one! Thanks for sharing.
Finish the problem
Menthix.net | Contact Me
05-04-2010 01:47 PM
Profile E-Mail PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects
Bookmarked! I have yet to find a script project where I need to use an extra DLL to do what I need, but if I do I now have a place to start.

Thank you for this excellent write-up! :)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
05-04-2010 04:01 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: Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects
Wow, excellent written tut (y)(y)(y).....
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-04-2010 06:05 PM
Profile PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects
Nice one (Y)

Btw, shouldn't this one be sticky?
05-04-2010 07:11 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects
It is half stickied: http://shoutbox.menthix.net/important.php
05-04-2010 07:39 PM
Profile E-Mail PM Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
O.P. RE: Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects
Hello folks,

I've updated the tutorial, briefing on how to let the DLL call back JScript function. It's in the tutorial's last section under the name of Advanced Topics. Special thanks to Eljay for shedding some light on the mechanism! ;)

I should be able to come up with a generic subclassing helper DLL sooner or later :chrongue:
05-08-2010 04:22 PM
Profile PM Web Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects
Ref: C# DllExportAttribute.

Okay, I've got absolutely no idea how the above thingy supposed to work, but can this tutorial be applied to C# as well?
05-09-2010 08:09 AM
Profile PM Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
O.P. RE: Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects
quote:
Originally posted by SmokingCookie
Ref: C# DllExportAttribute.

Okay, I've got absolutely no idea how the above thingy supposed to work, but can this tutorial be applied to C# as well?

Well, I just tried in Visual Studio to add MsgPlusLive.dll to the C# project Reference, and it refused to do so. As long as you can extract the Type Library (.tlb) from the DLL then things should be ok. You have to find a way though. Dunno if any Visual Studio-builtin command tools do this.
05-09-2010 08:30 AM
Profile PM Web Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects
I remember that regasm has some command-line argument that exports a .tlb file; could that be what you're pointing at?

Doesn't Patchou have anything like a .tlb file? :P

This post was edited on 05-09-2010 at 10:05 AM by SmokingCookie.
05-09-2010 08:34 AM
Profile PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » 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