Shoutbox

using interop.call - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: using interop.call (/showthread.php?tid=71373)

using interop.call by Deco on 02-04-2007 at 02:01 PM

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


RE: using interop.call by matty on 02-04-2007 at 02:30 PM

Messenger Plus! Live only allows up to 9 arguments when calling a function through Interop. Your dll requires 10.


RE: using interop.call by Deco on 02-04-2007 at 02:38 PM

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!


RE: using interop.call by matty on 02-04-2007 at 02:48 PM

Everything looks fine

Why not use the DrawTextW API?


RE: using interop.call by Deco on 02-04-2007 at 02:59 PM

This is for a directx overlay :)


RE: using interop.call by matty on 02-04-2007 at 03:08 PM

If you wrote the DLL yourself you could hardcode the vaules that will never change.


RE: using interop.call by Deco on 02-04-2007 at 09:12 PM

I didnt. :/