What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » trouble with strings [C++]

trouble with strings [C++]
Author: Message:
cooldude_i06
Full Member
***

Avatar
I'm so cool I worry myself.

Posts: 272
Reputation: 9
– / Male / –
Joined: Sep 2003
O.P. RE: trouble with strings [C++]
No No Taz that was issue 1, which was solved as I said before, this new issue was that I wanted to copy a buffer to a Databloc allocated by the script.

Anyways, through trial and error I got RtlCopyMemory function working. I'll post the code in case someone one day is searching for it:
code:
var data = Interop.Allocate(10); //buffer size 10
Interop.Call("some.dll", "foo", data.DataPtr);

code:
function foo(void* data){
     RtlCopyMemory(data, &buffer[0], 10); //buffer size 10
}

Now my next issue is that ReadString function stops at the first instance of null character. The buffer however contains many null characters. The alternative is to loop and use GetAt to filter out the null characters and retrieve the rest, but if someone knows of a more efficient method please let me know.

Thanks,
CD
[Image: clb2.jpg]
06-09-2007 10:29 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
trouble with strings [C++] - by cooldude_i06 on 06-08-2007 at 03:40 AM
RE: trouble with strings [C++] - by TazDevil on 06-08-2007 at 07:49 AM
RE: trouble with strings [C++] - by cooldude_i06 on 06-09-2007 at 08:54 AM
RE: trouble with strings [C++] - by vikke on 06-09-2007 at 09:07 AM
RE: trouble with strings [C++] - by cooldude_i06 on 06-09-2007 at 08:29 PM
RE: RE: trouble with strings [C++] - by TazDevil on 06-09-2007 at 08:44 PM
RE: trouble with strings [C++] - by cooldude_i06 on 06-09-2007 at 10:29 PM
RE: trouble with strings [C++] - by CookieRevised on 06-10-2007 at 03:06 AM
RE: RE: trouble with strings [C++] - by cooldude_i06 on 06-10-2007 at 07:06 AM
RE: trouble with strings [C++] - by TheBlasphemer on 06-10-2007 at 12:05 PM
RE: trouble with strings [C++] - by cooldude_i06 on 06-10-2007 at 09:09 PM
RE: trouble with strings [C++] - by -dt- on 06-11-2007 at 04:10 AM
RE: trouble with strings [C++] - by cooldude_i06 on 06-11-2007 at 07:34 AM


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