What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » A few questions.

A few questions.
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: A few questions.
quote:
Originally posted by Mnjul
I'm pretty sure you can use Interop.GetCallbackPtr inside the DLL to get the address of a jscript function (as long as you know the function name and the number of parameters). Then, cast the return value into an appropriate C++ function pointer then you should be able to call the function.
afaik, unfortunatly not. That address can only be used for synchronous callbacks, not asynchronous calls. So getting an address might be possible, but it might not be valid anymore at any time.

That is, dunno exactly how the rules go when you use it from inside your DLL though (using your method), but I wouldn't be surprised if the same thing applies for that DLL.

quote:
Originally posted by Mnjul
I'm pretty sure you can use Interop.GetCallbackPtr inside the DLL to get the address of a jscript function (as long as you know the function name and the number of parameters). Then, cast the return value into an appropriate C++ function pointer then you should be able to call the function.
Unfortunatly not. That address can only be used for synchronous callbacks, not async. So getting an address might be possible, but it might not be valid anymore at any time.

That is, dunno exactly how the rules go when you use it from inside your DLL though (using your method), but I wouldn't be surprised if the same thing applies for that DLL.

quote:
Originally posted by Eljay
Continuing to play around with communicating the other way via some callback objects... not sure if this is dodgy, my code is probably horrible because I've never done anything like this before but it seems to work ok :P

This example script just creates an object with a function named "testing". The object is then passed to the dll which invokes the testing method with 2 string parameters.
omg... that can't be working... that was waaaaay too easy and too little code :p:D

(y)(y)

/me pulls up a barrier so Patchou can't come in spoiling the fun by saying there is a catch

This post was edited on 05-06-2010 at 01:18 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-06-2010 01:04 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
A few questions. - by Emblem on 05-02-2010 at 03:29 AM
RE: A few questions. - by Matti on 05-02-2010 at 08:33 AM
RE: A few questions. - by CookieRevised on 05-03-2010 at 11:00 AM
RE: RE: A few questions. - by Matti on 05-03-2010 at 04:02 PM
RE: A few questions. - by CookieRevised on 05-04-2010 at 05:05 PM
RE: A few questions. - by Matti on 05-04-2010 at 06:15 PM
RE: A few questions. - by CookieRevised on 05-04-2010 at 06:32 PM
RE: A few questions. - by Eljay on 05-04-2010 at 06:51 PM
RE: A few questions. - by CookieRevised on 05-04-2010 at 07:01 PM
RE: A few questions. - by Eljay on 05-04-2010 at 07:47 PM
RE: A few questions. - by CookieRevised on 05-04-2010 at 08:03 PM
RE: RE: A few questions. - by TheSteve on 05-05-2010 at 07:29 AM
RE: A few questions. - by Eljay on 05-04-2010 at 10:14 PM
RE: A few questions. - by CookieRevised on 05-04-2010 at 11:27 PM
RE: A few questions. - by Eljay on 05-05-2010 at 08:41 AM
RE: A few questions. - by Mnjul on 05-05-2010 at 08:50 AM
RE: A few questions. - by CookieRevised on 05-06-2010 at 01:04 AM
RE: A few questions. - by Mnjul on 05-06-2010 at 06:49 AM
RE: A few questions. - by Eljay on 05-06-2010 at 07:25 AM
RE: A few questions. - by Emblem on 05-17-2010 at 05:07 PM


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