What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » using interop.call

using interop.call
Author: Message:
Deco
Full Member
***


Posts: 188
Reputation: 4
41 / Male / Flag
Joined: Aug 2006
O.P. using interop.call
Hi guys

This is a function I use from a DLL in visual basic I was trying to use it in MPL scripting system but couldn't get it to work.
This is how I use it in VB:
code:
Public Declare Function GPML_SetTextMultilineData Lib "my.dll" (ByVal wPosX As Short, ByVal wPosY As Short, ByVal pText As String, ByVal dwTextColor As Integer, ByVal bBlackBackground As Boolean, ByVal cFontSize As Byte, ByVal bTextBold As Boolean, ByVal wSizeX As Short, ByVal wSizeY As Short, ByVal cFontFamily As Byte) As Boolean


And this was how I tried to use it in js:

code:
Interop.Call("my.dll","GPML_SetTextMultilineData",15, 520, "Hi", 0, false, 20, false, 770, 100, 1);


This is the error I get:
Error: Wrong number of arguments or invalid property assignment.
Line: 3. Code: -2146827838.
Function OnEvent_Initialize returned an error. Code: -2147352567

Any help is appreciated.

Thanks


This post was edited on 02-04-2007 at 02:06 PM by Deco.
02-04-2007 02:01 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: using interop.call
Messenger Plus! Live only allows up to 9 arguments when calling a function through Interop. Your dll requires 10.
02-04-2007 02:30 PM
Profile E-Mail PM Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
41 / Male / Flag
Joined: Aug 2006
O.P. RE: using interop.call
Shoot... anyway you think I can work around that?

Maybe create a second dll that calls the first dll? Most of my params will always be the same I could just hard code it into them or load them through another call....

What do you think?

Other than that did you see anything wrong with the types?

Thanks!
02-04-2007 02:38 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: using interop.call
Everything looks fine

Why not use the DrawTextW API?
02-04-2007 02:48 PM
Profile E-Mail PM Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
41 / Male / Flag
Joined: Aug 2006
O.P. RE: using interop.call
This is for a directx overlay :)
02-04-2007 02:59 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: using interop.call
If you wrote the DLL yourself you could hardcode the vaules that will never change.
02-04-2007 03:08 PM
Profile E-Mail PM Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
41 / Male / Flag
Joined: Aug 2006
O.P. RE: using interop.call
I didnt. :/
02-04-2007 09:12 PM
Profile E-Mail PM Web 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