What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Dlls for Interop.Call

Dlls for Interop.Call
Author: Message:
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
O.P. Dlls for Interop.Call
Hi guys,

What kind of dll do I have to make so I can use it in the scripts?

I understand from the documentation that the only thing I have to watch is that the functions are __stdcall ..

Anything else?

Anyone ever create a Dll to use with scripts and wouldn't mind sending me an example to learn from?

Thanks
12-13-2006 10:16 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Dlls for Interop.Call
If you are using Visual Basic you need to use a tool called VBAdvance so that it will export functions other then that a standard Windows DLL with Functions Exported would be fine.
12-13-2006 10:46 PM
Profile E-Mail PM Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
O.P. RE: Dlls for Interop.Call
Ok so I just make public functions...use Interop.Call(pathtodll+"mydll.dll","myfunc",input)?

And if I'm making this dll in vb.net use that tool.. :)

Ok got it will try!
12-13-2006 11:46 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Dlls for Interop.Call
quote:
Originally posted by Deco
Ok so I just make public functions...use Interop.Call(pathtodll+"mydll.dll","myfunc",input)?

And if I'm making this dll in vb.net use that tool.. :)

Ok got it will try!
No vbAdvance doesn't support VB.Net it supports Visual Basic 6. I am not too sure about using VB.Net never programmed in it.
12-13-2006 11:56 PM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Dlls for Interop.Call
quote:
Originally posted by Matty
I am not too sure about using VB.Net never programmed in it.
.NET has a COM Interop thing that may be of use.
[Image: spartaafk.png]
12-14-2006 05:31 PM
Profile PM Web Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
RE: Dlls for Interop.Call
you should create the DLL as W32 DLL, not activeX. or trying create activeX dll?
12-14-2006 07:44 PM
Profile E-Mail PM Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
O.P. RE: Dlls for Interop.Call
The problem was solved in another thread. The one about ActiveXObjects. Someone send a working example of a dll in c# and I just went on frmo that.

THanks though
12-14-2006 09:21 PM
Profile E-Mail PM Web Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: Dlls for Interop.Call
quote:
Originally posted by Matty
quote:
Originally posted by Deco
Ok so I just make public functions...use Interop.Call(pathtodll+"mydll.dll","myfunc",input)?

And if I'm making this dll in vb.net use that tool.. :)

Ok got it will try!
No vbAdvance doesn't support VB.Net it supports Visual Basic 6. I am not too sure about using VB.Net never programmed in it.


IL can't export stdcallable functions. It isn't the same format as a windows binary.

quote:
Originally posted by RaceProUK
quote:
Originally posted by Matty
I am not too sure about using VB.Net never programmed in it.
.NET has a COM Interop thing that may be of use.

exporting to COM is different than exporting a function normally. you can't call a com function in a dll.
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
12-14-2006 09:32 PM
Profile PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Dlls for Interop.Call
quote:
Originally posted by ShawnZ
IL can't export stdcallable functions. It isn't the same format as a windows binary.
But a .NET DLL can have native exports.
quote:
Originally posted by ShawnZ
exporting to COM is different than exporting a function normally. you can't call a com function in a dll.
You can: you just need to create the DLL's COM object first.
[Image: spartaafk.png]
12-15-2006 04:31 PM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Dlls for Interop.Call
I'm not sure if the thread title is the explicit request (using Interop.Call) or if it is because he didn't know you can make and use ActiveXs yourself too. So to answer people who read this thread and would otherwise be misinformed:

quote:
Originally posted by Matty
If you are using Visual Basic you need to use a tool called VBAdvance so that it will export functions other then that a standard Windows DLL with Functions Exported would be fine.
You don't need that (not free, and not available anymore) tool since in VB you can make an ActiveX OCX or DLL nativly and since it is ActiveX it can work in scripts too.

Anyways, the tool vbAdvance can indeed make standard DLLs, but there are a lot of caveats and requirements and limitations. And if one isn't an extremely advanced VB programmer and if one doesn't have expert notion of APIs aand other advanced programming techniques it is even suggested in that tool itself to not even attempt it.

quote:
Originally posted by afelipE_scripts
you should create the DLL as W32 DLL, not activeX. or trying create activeX dll?
No, an ActiveX can work in scripts too. Heck, extremely many scripts use ActiveX objects, if it weren't for ActiveX half the existing scripts wouldn't work.


This post was edited on 12-27-2006 at 11:13 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
12-27-2006 10:53 AM
Profile PM Find Quote Report
« 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