FileStream fs = new FileStream(pdfpath,FileMode.Open,FileAccess.Read);
byte[] fileCount = new byte[fs.Length];
fs.Read(fileCount, 0, fileCount.Length);
fs.Close();
Decrypt(ref fileCount);
axFoxitPDFSDK1.OpenBuffer(fileCount, fileCount.Length, "");
axFoxitPDFSDK1是一个第三方组件,用阅读PDF文件的.这样,虽然能阅读,但总是报错,尝试读取或写入受保护的内存,这通常指示其他内存已损坏.,无论我怎样去释放fs使用的资源,都没用,怎么回事?
byte[] fileCount = new byte[fs.Length];
fs.Read(fileCount, 0, fileCount.Length);
fs.Close();
Decrypt(ref fileCount);
axFoxitPDFSDK1.OpenBuffer(fileCount, fileCount.Length, "");
axFoxitPDFSDK1是一个第三方组件,用阅读PDF文件的.这样,虽然能阅读,但总是报错,尝试读取或写入受保护的内存,这通常指示其他内存已损坏.,无论我怎样去释放fs使用的资源,都没用,怎么回事?
{
byte mis = 23;
for (int i = 0; i < context.Length; i++)
{
context[i] = (byte)(context[i] ^ mis);
}
}这只是个解密方法而已,不用ref问题也还是一样,我试过GC强制垃圾回收,也还是一样