Cole
Newbie
- Joined
- Jan 19, 2004
- Messages
- 6,427
- Reaction score
- 1
So I kind of lost some old code of mine and my memorys a bit blank which has led me to this very important question.
So I am sending data from a C++ dll to a C# program.
I have a function that parses a complex file in an archive. Then it stores everything into variables and I have functions for then accessing variables(many pointers) for my C# program.
Anyway my question is, when parsing the file I need to store various strings. 1024 is the maximum amount of strings I would have to store. I have no idea of the length of each string. I need a way of adding a single char to the end of a LPCSTR(in a while statement).
However strcat and well...anything I've tried gives me a corrupt memory error in C#. If I disable the strcat it will work fine however then I have no string.
So I am sending data from a C++ dll to a C# program.
I have a function that parses a complex file in an archive. Then it stores everything into variables and I have functions for then accessing variables(many pointers) for my C# program.
Anyway my question is, when parsing the file I need to store various strings. 1024 is the maximum amount of strings I would have to store. I have no idea of the length of each string. I need a way of adding a single char to the end of a LPCSTR(in a while statement).
However strcat and well...anything I've tried gives me a corrupt memory error in C#. If I disable the strcat it will work fine however then I have no string.