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