c# shell32 using code example
Example 1: shell32.dll c# example
public void ZipFile(string Input, string Filename)
{
Shell32.Shell Shell = new Shell32.Shell();
CreateZipFile(Filename);
Shell.NameSpace(Filename).CopyHere(Input,0);
System.Threading.Thread.Sleep(2000);
}
}
Example 2: shell32.dll c# example
public static void UnZip(string zipFile, string folderPath)
{
if (!Directory.Exists(folderPath))
Directory.CreateDirectory(folderPath);
Shell32.Shell objShell = new Shell32.Shell();
Shell32.Folder destinationFolder = objShell.NameSpace(folderPath);
Shell32.Folder sourceFile = objShell.NameSpace(zipFile);
foreach (var file in sourceFile.Items())
{
destinationFolder.CopyHere(file, 4 | 16);
}
}