我根据别人写的用vb调用的代码,进行改装到c#里面,但是会报以下异常:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
vb代码如下:

End Function

c#代码如下:

关于用zlibwapi.dll进行字节数组压缩的问题[DllImport("kernel32.dll")]
关于用zlibwapi.dll进行字节数组压缩的问题        
public unsafe static extern void CopyMemory(IntPtr hpvDest, IntPtr hpvSource, int cbCopy);
关于用zlibwapi.dll进行字节数组压缩的问题        [DllImport(
"zlibwapi.dll")]
关于用zlibwapi.dll进行字节数组压缩的问题        
public unsafe static extern int compress(IntPtr dest, int destLen, IntPtr src, int srcLen);
关于用zlibwapi.dll进行字节数组压缩的问题        [DllImport(
"zlibwapi.dll")]
关于用zlibwapi.dll进行字节数组压缩的问题        
public unsafe static extern int uncompress(IntPtr dest, int destLen, IntPtr src, int srcLen);
关于用zlibwapi.dll进行字节数组压缩的问题
关于用zlibwapi.dll进行字节数组压缩的问题        
private const long OFFSET = 8;
关于用zlibwapi.dll进行字节数组压缩的问题 
private void button2_Click(object sender, EventArgs e)
        }



 

相关文章:

  • 2022-02-02
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2022-01-02
  • 2021-11-05
相关资源
相似解决方案