1. decompression method Reprinted from the http://www.bkjia.com/kf/201204/128704.html
"C#decompress The. ZIP file. A lot of methods are found on the Internet, using System. IO. compression. GZipStream uses the J # library function and the Java-based library function. However, many of them are not very good. In the end, it is still the System function System. shell. folder. copyHere (oItem [, intOptions]) is the best choice. The specific method is as follows:
1. Add the reference Shell32.dll, which can be found in Windows \ system32.
2. Add the method.
Static void UnZip (string zipFile, string destFolder)
{
Shell32.ShellClass SC = new Shell32.ShellClass ();
Shell32.Folder SrcFolder = SC. NameSpace (zipFile );
Shell32.Folder DestFolder = SC. NameSpace (destFolder );
Shell32.FolderItems items = SrcFolder. Items ();
DestFolder. CopyHere (items, 20 );
}
(Note that destFolder must exist in advance. This method will not automatically create a folder)
DestFolder. in CopyHere (items, 20), 20 is actually an intOptions flags (4 | 16). 4 indicates that the processing window is not displayed, 16. If the processing window is displayed, select "yes to all ". For more information about intOptions, visit http://msdn2.microsoft.com/en-us/library/ms723207.aspx. "
2. "In VS2010, the interoperability type"... "cannot be embedded. Please switch to the applicable interface solution "solution reproduced from the http://www.bkjia.com/kf/201204/128705.html
"Recently, VS2010 was used. When COM components were referenced, the"… ", Use the error message of the applicable interface instead. Check the information and find the solution. The record is as follows:
Right-click the dll introduced in the project, select properties, and set "embedded interoperability type" to False. "
From Fengfeng