What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » DLL return value

DLL return value
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: DLL return value
Like you use Interop.Call with Windows API's, you need to allocate some memory space in your script first (Interop.Allocate).

Then, in the script, you call the function in the DLL and you provide the pointer to that allocated space as a parameter. In your DLL you write whatever stuff you want to that pointer.

And make sure you don't exceed the available space! This can be done by providing a size parameter in the script when you call the function. Or write the size in the first x bytes (as much as you need, eg: 4 bytes, thus as a DWORD) of the allocated space. Both methods also used in many Windows APIs.

The data you write to that pointer can be whatever you want. It is how you handle and interpret that data in the script what makes sense of it.

This post was edited on 12-29-2006 at 10:01 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
12-29-2006 09:57 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
DLL return value - by deAd on 12-28-2006 at 07:54 PM
RE: Calling a DLL (two questions) - by J-Thread on 12-28-2006 at 08:59 PM
RE: Calling a DLL (two questions) - by deAd on 12-28-2006 at 09:02 PM
RE: DLL return value - by CookieRevised on 12-29-2006 at 09:57 AM
RE: DLL return value - by deAd on 12-29-2006 at 04:28 PM
RE: DLL return value - by CookieRevised on 12-29-2006 at 05:12 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