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:
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
The TLB is already in MsgPlusLive.dll as a resource (resource type TYPELIB\1). You just need to extract it. You can extract type libraries resources (TLB files) in various ways.

You can use rundll32.exe for example to extract it (although it is not straitforward; also, instead of the keyword 'TypeLib' you could use 'GenerateTypeLib')

Or from Microsoft: The OLE/COM Object Viewer can extract the IDL (decompiled Type Library).
(File > View TypeLib > select MsgPlusLive.dll)

More tools from Microsoft:
http://msdn.microsoft.com/en-us/library/ms680581(VS.85).aspx

Or you can use tools like Resource Hacker or (even better, but not free) PE Explorer to extract the compiled type library.

Then there are Type Library viewers like TypeLib Viewer from iTripoli.

Note that RegAsm.exe  isn't going to work here.


-------------------------------------------------

I recommend using Resource Hacker (free) or PE Explorer (can be used for 30 days for free). Using PE explorer is the easiest way to extract a TLB imho.

In Resource Hacker:
- Open MsgPlusLive.dll
- Select the TYPELIB\1\0 resource
- From the Action menu, choose 'Save Resource as a binary file' or 'Save Resource as a *.res file'
- Rename the saved file to "MPLiveScriptingLib.tlb"

In PE Explorer:
- Open MsgPlusLive.dll
- Go to the resource viewer
- Right click on the TYPELIB\1 resource
- Choose 'Save Resource as...' (or click CTRL+SHIFT+S)
- Enter the filename "MPLiveScriptingLib.tlb"

This post was edited on 05-09-2010 at 03:04 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-09-2010 02:34 PM
Profile PM 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
The super easy way to extract resources, if you have 7-Zip installed, just right-click the .dll and extract with 7-Zip.
Finish the problem
Menthix.net | Contact Me
05-09-2010 04:51 PM
Profile E-Mail 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
Okay, I've got the .tlb file; now what? :P
Visual Studio won't add a reference to it.

EDIT: I've got it in VS's object browser atm, and it does indeed show the members described by Mnjul.

This post was edited on 05-09-2010 at 05:16 PM by SmokingCookie.
05-09-2010 05:10 PM
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