1

嗨,我用它来将文件解压缩到目录

private string UnzipFile(string inputFileName, string destinationPath)
{
    Shell shell = new ShellClass();
    Folder folder = shell.NameSpace(inputFileName);
    Folder folder2 = shell.NameSpace(destinationPath);
    string name = folder.Items().Item(0).Name;
    folder2.CopyHere(folder.Items(), "");
    return name;
}

当我编译项目时,它也给了我 interop.shell32.dll

我通过 ilmerge 将 interop.shell32.dll 与我的可执行文件合并

(我编译@ win 7 vs 12)

但是 unzipfile 函数会导致程序崩溃@Windows xp sp2

知道为什么会这样吗?

4

0 回答 0