C# 如何测试7zip arhive?
我正在尝试测试7zip arhive是否损坏,我找到了一个很好的参考添加到我的项目中,它叫SevenZipSharp.dll,但我找不到帮助文件来告诉我如何使用,有人知道如何使用这个库或其他方法 SevenZipExtractor类有一个检查方法,根据XML文档:C# 如何测试7zip arhive?,c#,7zip,C#,7zip,我正在尝试测试7zip arhive是否损坏,我找到了一个很好的参考添加到我的项目中,它叫SevenZipSharp.dll,但我找不到帮助文件来告诉我如何使用,有人知道如何使用这个库或其他方法 SevenZipExtractor类有一个检查方法,根据XML文档: /// <summary> /// Performs the archive integrity test. /// </summary> /// <returns>
/// <summary>
/// Performs the archive integrity test.
/// </summary>
/// <returns>True is the archive is ok; otherwise, false.</returns>
SevenZipSharp源代码在中提供。查看它应该能够回答关于该库的任何问题。SevenZipExtractor类有一个检查方法,根据XML文档:
/// <summary>
/// Performs the archive integrity test.
/// </summary>
/// <returns>True is the archive is ok; otherwise, false.</returns>
SevenZipSharp源代码在中提供。查看它应该能够回答您关于该库的任何问题。这是一个关于在C中使用7Zip DLL的示例
这应该会有帮助,如果没有,至少可以为你指明正确的方向
干杯 这是一个在C中使用7Zip DLL的副产品
这应该会有帮助,如果没有,至少可以为你指明正确的方向
干杯 SevenZipExtractor类,用于提取和获取有关7-zip存档的信息
SevenZipExtractor zipfile=new SevenZipExtractor("path to your archive");
if (zipfile.Check())
{
MessageBox.Show("Your archive or zip is ok");
}
else
{
MessageBox.Show("Your archive or zip is not ok");
}
从以下位置下载库:
该库的文档位于chm文件中。检查用于提取和获取有关7-zip存档的信息的SevenZipExtractor类的交叉引用
SevenZipExtractor zipfile=new SevenZipExtractor("path to your archive");
if (zipfile.Check())
{
MessageBox.Show("Your archive or zip is ok");
}
else
{
MessageBox.Show("Your archive or zip is not ok");
}
从以下位置下载库:
该库的文档位于chm文件中。检查是否有交叉引用Intellisense没有帮助吗?它没有说明任何关于类的内容。Intellisense没有帮助吗?它没有说明任何关于类的内容。这正是我所做的。我得到了这个错误:无法加载7-zip库或内部COM错误!消息:库无效。发现问题所在!我不得不从SevenZipSharp.codeplex.com下载dll,并像这样设置我的引用:SevenZip.SevenZipExtractor。SetLibraryPath@D:\C\Librari Extra\7z.dll@XandrUu-那么你在找其他人为你写代码?这不是一个好的测试。如果存档受密码保护,或者如果您在多部分卷中选择非第一个卷,则在这种情况下也会显示此错误。这正是我所做的。我得到了这个错误:无法加载7-zip库或内部COM错误!消息:库无效。发现问题所在!我不得不从SevenZipSharp.codeplex.com下载dll,并像这样设置我的引用:SevenZip.SevenZipExtractor。SetLibraryPath@D:\C\Librari Extra\7z.dll@XandrUu-那么你在找其他人为你写代码?这不是一个好的测试。如果存档受密码保护,或者在多部分卷中选择非第一个卷,则在这种情况下也会显示此错误。