Hi people... I could really do with someones expertise today!
I have the following c dll that I need to call within C#
extern "C" DECOMPRESSION_API int _stdcall Decompress_Event(unsigned
char * inArr, //IN: BINARY DATA
int ArrSize,
//IN: SIZE OF BINARY DATA
unsigned char * outArr,
//OUT: ASCII DATA
int maxOut)
//OUT: Maximum length of returned character string
What I have got so far in c# is as follows:
[DllImport("Decompression.dll",SetLastError = true,CharSet =
CharSet.Auto)]
private static extern int
Decompress_Event([MarshalAs(UnmanagedType.LPArray)]char[] inArr, uint
ArrSize, [MarshalAs(UnmanagedType.LPArray)]out byte[] outArr, uint
maxOut);
and the call to this is:
Decompress_Event( x[0], (long)payloadReturned.ToArray().Length,
outArray[0], tempVal);
So far all I get is that it unbalances the stack... so I am guessing I
have something wrong somewhere...
Any help at all would be really appreciated!