Conflict between Shell32 and AxSHDocVw.dll

Mar 21 2010 6:11 AM
Hi All,

I have a strange problem due to a conflict between Shell32.dll and AxSHDocVw.dll

Details:
I was using the following code to unzip files and it was working perfectly.

private void Unzip(string sourceFile, string DestinationPath)
        {                    
            Shell32.ShellClass shell = new ShellClass();
            Folder sourceFolder = shell.NameSpace(sourceFile);
            Folder destinationFolder = shell.NameSpace(DestinationPath);
            destinationFolder.CopyHere(sourceFolder.Items(), "");
        }

Later on i included an axWebBrowser and added reference to AxSHDocVw.dll and SHDocVw.dll. Although the axWebBrowser was working fine but my Unzip function stopped working.
The 'sourceFolder' was not getting initialized and was always null.

The thing is Shell32 class works perfectly until AxSHDocVw.dll is included. Please let me get rid of the conflict

Thanks,
Chanchal