有一个C++程序,原形如下LZ77_API BOOL __stdcall Decompress(int compresscode,BYTE* src, int srclen, BYTE* dest).
此方法在VB中调用成功.本人在C#中调用如下
[DllImport("lz77.dll",CallingConvention=CallingConvention.StdCall,SetLastError=true)] 
private static extern bool Decompress(int CompCode,[MarshalAs(UnmanagedType.LPArray)]byte[] ImportList,int length, [MarshalAs(UnmanagedType.LPArray)]ref byte[] GetList);因为此方法的返回值为bool形,还需要返回一个byte数组.bool isDone=Decompress(1,tempList,length,ref returnList);这是我的调用发现返回值isDone显示成功,但是returnList总是不能返回正确的值.不知为什么.请高手指点