What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [question] Calling an external DLL

Pages: (2): « First [ 1 ] 2 » Last »
[question] Calling an external DLL
Author: Message:
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
O.P. [question] Calling an external DLL
How do you call an external dll? I'm really confused. I'm using VB.NET to make the dll, and I'm registering it in the DotNetFiles section of the ScriptInfo.xml. However, each time I've tried to call a function from it, I get "Error: unknown."

I tried giving the DLL Name parameter of Interop.Call a nonexistant filename, and I get the same error with the same parameters as I did, with the same error code. This leads me to believe that Plus! cannot find my dll, however, everything I've tried gives me this same error.

So how can I make this work?
06-25-2006 04:37 PM
Profile PM Find Quote Report
segosa
Community's Choice
*****


Posts: 1407
Reputation: 92
Joined: Feb 2003
RE: [question] Calling an external DLL
Interop.Call is for win32 dlls, not .NET ones.

I'm not sure what you need to use for .NET DLLs. Probably ActiveXObject().
The previous sentence is false. The following sentence is true.
06-25-2006 04:54 PM
Profile PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
O.P. RE: [question] Calling an external DLL
Ah, I see. I'll try that soon. :)

EDIT: I can't seem to get this to work. :S

This post was edited on 06-25-2006 at 05:51 PM by deAd.
06-25-2006 05:27 PM
Profile PM Find Quote Report
BlackSun1102
New Member
*

Avatar

Posts: 9
33 / Male / –
Joined: Jun 2006
RE: [question] Calling an external DLL
Hi,

I need to call an .Net Library, too, so I have the same problem...
Does anybody know a solution?

Edit: We can use the Included Com-Interop Services in .Net, but then itīs mindless from the developers of Plus! to differentiate between OLE and .Net Librarys...

Regards Chris

This post was edited on 06-25-2006 at 06:39 PM by BlackSun1102.
Iīm sorry for my bad english. When you find a mistake in my spelling I would be very pleased, if you could tell me.
06-25-2006 06:21 PM
Profile E-Mail PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: [question] Calling an external DLL
JScript doesn't support .net objects natively so you have to use COM interop to access them. As long as you have the option checked in your project, you shouldn't see any difference at all :). To instantiate your .NET object, just use new ActiveXObject().
[Image: signature2.gif]
06-25-2006 09:41 PM
Profile PM Web Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
O.P. RE: [question] Calling an external DLL
What option? "Make assembly COM-Visible" ? And then we put it in <DotNetFiles> ? Also, how do I call it in ActiveXObject? Just ActiveXObject("MyDLL") ... or do I need something like ActiveXObject("MyDLL.Something-Else-Goes-Here") ?

This post was edited on 06-25-2006 at 10:30 PM by deAd.
06-25-2006 10:23 PM
Profile PM Find Quote Report
BlackSun1102
New Member
*

Avatar

Posts: 9
33 / Male / –
Joined: Jun 2006
RE: [question] Calling an external DLL
Hi,

Pachou, why you doesnīt add a .Net-Scriptingfeature for Plus! Live?
The Framework offers many Runtime Support...

Using COM Interop in .Net is mindless! The objective of .Net itīs to supersede COM...

Regards Chris
Iīm sorry for my bad english. When you find a mistake in my spelling I would be very pleased, if you could tell me.
06-26-2006 03:26 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
O.P. RE: [question] Calling an external DLL
I'm still not catching this. BlackSun, if you got it, can you say something?
06-26-2006 08:58 PM
Profile PM Find Quote Report
BlackSun1102
New Member
*

Avatar

Posts: 9
33 / Male / –
Joined: Jun 2006
RE: [question] Calling an external DLL
Hi,

You must use COM Interop attribtes, to "brand" your functions as COM compactible.
Then use the "Call" function to from you JScript to call your function...

If you donīt know about COM Interop, you should read here.

Regards Chris

This post was edited on 06-27-2006 at 12:17 PM by BlackSun1102.
Iīm sorry for my bad english. When you find a mistake in my spelling I would be very pleased, if you could tell me.
06-27-2006 12:07 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
O.P. RE: [question] Calling an external DLL
Well, I can set it as com-visible in the Assembly Information...is that it? Then just put it in DotNetFiles and use Interop.Call?
06-27-2006 01:34 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