Hi, guys.
I'm receiving a dynamic amount of strings and from these strings I need to make a single string containing them all. However, I need to preserve the NULL characters to separate the strings. If you see this page of documentation and scroll down to the REG_MULTI_SZ entry, you'll see the layout of the string needed.
My thoughts on how I would go about this are:
The trouble is then how do I include the terminating nulls, and once again for the final null (the string should be terminated with 2)?
I'll give you what I've tried when I have some time.
Mark.
I'm receiving a dynamic amount of strings and from these strings I need to make a single string containing them all. However, I need to preserve the NULL characters to separate the strings. If you see this page of documentation and scroll down to the REG_MULTI_SZ entry, you'll see the layout of the string needed.
My thoughts on how I would go about this are:
Code:
var full_string // empty
foreach strings as string:
reallocate memory for string based on full_string's length and string's length multiplied by sizeof char.
concatenate string to empty_string using strcat.
I'll give you what I've tried when I have some time.
Mark.
Comment