Possible Duplicate:
How do I create 7-Zip archives with .NET?
How can we integrate 7-zip archiving library in a C#.NET application. I am working on an application that need to have an extraction utility for stored zip files, for which I guess 7Zip's DLL will be the best.
Can any one tell me how can I use it to integrate into my application. My need is to open a Fileopen dialog on a button click->browse for the zip file->Then extract it and save the files somewhere.
I tried using SevenZipSharp Library, here is the code:
private void button1_Click(object sender, EventArgs e)
{
SevenZip.SevenZipExtractor.SetLibraryPath(@"F:\PARADOX\WFAST\WFAST\Res\7z.dll");
SevenZip.SevenZipExtractor ext = new SevenZip.SevenZipExtractor(@"C:\Users\user\Desktop\stitch.zip");
System.IO.Directory.CreateDirectory("C:/Users/user/Desktop/Stitch");
ext.BeginExtractArchive("C:/Users/user/Desktop/Stitch");
}
But get error: Can not load 7-zip library or internal COM error! Message: failed to load library.