I am writing a c# app using .NET 2.0. I need to use an old library for proprietary compression. I don't have source code for the library, and the developers behind it are long gone.
My problem is that the resulting char[] contains nulls, and is being truncated. Here is the declaration for the function:
[DLLImport("foo.dll")]
public static extern bool CompressString(char[] inputValue, out char[] outputValue, uint inputLength, out uint outputLength);
How can I declare that the output char[] should be handled as a byte[], and not null terminated?
More info:
I do have the header file. Here is the declaration:
BOOL CompressString(char *DecompBuff, char **RetBuff, unsigned long DecompLen, unsigned long *RetCompLen);