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++]
Thanks TazDevil, the scope issue didn't cross my mind at all and strncpy function worked perfectly!

Now on to the second problem:

What I have is a large buffer of unsigned chars (const u_char* buffer). This buffer is created at the start and the function does not end so we don't have to worry about the scope.

What I want to do is basically read this buffer in the Plus script.
I have tried typecasting it to char and assigning it to a pointer passed by the script but that doesn't help.
code:
const char* passedVariable = reinterpret_cast <const char*> (buffer);

Second I tried copying entire buffer to a Databloc allocated by the script using RtlCopyMemory, but I couldn't get the syntax correct.

I just want to be able to read this buffer into the script in the most efficient way possible. In fact I would even like to avoid copying memory. If anyone has suggestions, they would be much appreciated.

Thanks
CD
[Image: clb2.jpg]
06-09-2007 08:54 AM
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