Home › Forums › .NET libraries › Xceed Zip & Real-Time Zip for .NET › Xceed Zip component isn't unzipping ZIP file while using this Com component
-
AuthorPosts
-
#44203 |
Xceed Zip(v.5.8) component is not unzipping the ZIP file when using this component as COM after zipping the same file. Please Suggest.
I used the following code:internal static bool UnzipDataFile(string sourceFile, string destinationPath, string filesToProcess) {
Utilities._errMessage += “:UnZipDataFile”;bool isSuccess = false;
object objXceedZip = null;
try
{
objXceedZip = Utilities.GetComProgInstance(_xceedZipProgramID); // _xceedZipProgramID is XceedSoftware.XCeedZipstring fileToProcess = filesToProcess;
if (Directory.Exists(destinationPath))
Directory.Delete(destinationPath, true);Utilities.SetObjectProperty(objXceedZip, “ExtraHeaders”, 2); //xehFileTimes=2
Utilities.SetObjectProperty(objXceedZip, “ZipFilename”, sourceFile);
if (filesToProcess.Trim().Length > 0)
Utilities.SetObjectProperty(objXceedZip, “FilesToProcess”, fileToProcess);
Utilities.SetObjectProperty(objXceedZip, “UnzipToFolder”, destinationPath);
Utilities.SetObjectMethod(objXceedZip, “License”, _xceedZipLicenseKey);
Utilities.SetObjectMethod(objXceedZip, “UnZip”, null);isSuccess = true;
if ((objXceedZip != null) && (objXceedZip.GetType().Name == “__ComObject”))
System.Runtime.InteropServices.Marshal.ReleaseComObject(objXceedZip);
}Please suggest what we need to do?
Hi – We haven’t received any solution till now on this issue. Its really urgent and our project delivery stuck because of this issue. Please help.
Hi,
I’m assuming your Utilities.SetObjectMethod() calls the COM method specified by the string parameter.
If so, your “UnZip” value is incorrect. The name of the method is “Unzip”.
If after making the change the operation still doesn’t work, check the return value of the Unzip method. It is an error code that specifies that went wrong with the operation:
-
AuthorPosts
- You must be logged in to reply to this topic.