Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Xceed Zip component isn't unzipping ZIP file while using this Com component

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • shivi
    Participant
    Post count: 3
    #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.XCeedZip

    string 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);
    }

    shivi
    Participant
    Post count: 3

    Please suggest what we need to do?

    shivi
    Participant
    Post count: 3

    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.

    Fawzi [Xceed]
    Member
    Post count: 722

    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”.

    Source: https://xceed.com/wp-content/documentation/xceed-zip-for-activex/webframe.html#Unzip_method.html

    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:

    https://xceed.com/wp-content/documentation/xceed-zip-for-activex/webframe.html#xcdError_error_codes.html

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.