You should use a byte buffer instead... Strings are by definition finished after chr(0). Therefore it's just right that .NET ends each string after the first chr(0) is found and ignores all the memory afterwards.