Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/windows-phone-8/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows phone 7 在windows phone中使用SharpCompress liabrary提取.7zip文件,但出现异常_Windows Phone 7_Windows Phone 8 - Fatal编程技术网

Windows phone 7 在windows phone中使用SharpCompress liabrary提取.7zip文件,但出现异常

Windows phone 7 在windows phone中使用SharpCompress liabrary提取.7zip文件,但出现异常,windows-phone-7,windows-phone-8,Windows Phone 7,Windows Phone 8,此代码给出SharpCompress.Common.InvalidFormatException类型的异常,请在wp7中提供解决方案 IArchive archive = null; IReader reader = null; archive = SevenZipArchive.Open(fileStream, Options.LookForHeade

此代码给出SharpCompress.Common.InvalidFormatException类型的异常,请在wp7中提供解决方案

                        IArchive archive = null;
                        IReader reader = null;
                        archive = SevenZipArchive.Open(fileStream, Options.LookForHeader);

                        reader = archive.ExtractAllEntries();            
                        while (reader.MoveToNextEntry())
                        {
                            if (!reader.Entry.IsDirectory)
                            {
                                Stream _redaer = new MemoryStream();
                                reader.WriteEntryTo(_redaer);
                                fileName = reader.Entry.FilePath;
                                int index = fileName.LastIndexOf("/");
                                string file = fileName.Substring(index + 1, (fileName.Length - (index + 1)));
                                using (binaryReader = new BinaryReader(_redaer, encoding))
                                {
                                    long fileLength = _redaer.Length;
                                    MemoryStream ms = new MemoryStream();
                                    _redaer.Position = 0;
                                    _redaer.CopyTo(ms);
                                    byte[] buteArray = ms.ToArray();
                                    SaveToIsoStore(fileName, buteArray);
                                }
                            }
                        }