Home Forums ActiveX components Xceed Zip for ActiveX & x64 Xceed in FoxPro 9.0 with Compression in Memory

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #42488 |

    Hi Everyone,

    I am trying out compression of Strings using Xceed ZIP library. Though, I can create ZIP files, I am unable to use Memory Compression. The code I am using is as follows :

    aaaaa

    o=CREATEOBJECT(“XceedSoftware.XceedCompression”)

    ?o.License(“ZIP65-xxxxx-xxxxx-xxxx”)

    ac=space(100) 

    =COMARRAY(o,10) 

    ?o.Compress(“abhay is a fool”,@ac,.t.)


    The call to compress returns 0 and the value of ac remains Blank.

    Any help will be appreciated

    Thanks in advance.

     Abhay 

    Imported from legacy forums. Posted by Abh (had 1086 views)

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi Abhay,

    We do not officially support FoxPro, and as such cannot provide a direct code sample.

    However, the Compress() method takes a ‘Variant’ object as input and writes the compressed data to another ‘Variant’ object.

    Documentation:
    http://doc.xceedsoft.com/products/XceedZip/#Compress_method.html

    Since FoxPro supports COM object, it should support COM’s Variant data type.

    Create a Variant object and assign your string to it following the guidelines of FoxPro.

    For the compressed data, create an empty Variant object (not a null pointer, but a Variant object that isn’t assigned any data) and pass it to Compress() as the second parameter. The function should fill the Variant with compressed data.

    Be aware that the compressed data Variant will contain a byte array and not a string.

    Imported from legacy forums. Posted by Diane [Xceed] (had 230 views)

    User (Old forums)
    Member
    Post count: 23064

    No Not working. Am still scratching my head.

    Abhay

    Imported from legacy forums. Posted by Abh (had 168 views)

    User (Old forums)
    Member
    Post count: 23064

    Interestingly, the Object returns 0, that is , “Operation Completed Successfuly”, when I run it. But the FoxPro cCompData variable stays empty.

    LOCAL oComp As XceedSoftware.XceedCompression

    oComp=CREATEOBJECT(“XceedSoftware.XceedCompression”)

    =oComp.License(“SCO11-XXXXX-XXXXX-XXXX”)

    oComp.CompressionLevel= 9 && xclHigh

    oComp.CompressionMethod= 8 && xcmDeflated

    cData = “Abhay is a fool”

    *LOCAL cCompData As Variant
    *cCompData=SPACE(100)
    DIMENSION cCompData[100]
    =COMARRAY(oComp,1+10)

    ?oComp.Compress(“Abhay Sobti”,@cCompData,.t.)
    ?oComp.GetErrorDescription(0)
    ?”Compressed Data : ” , m.cCompData

    Abhay

    Imported from legacy forums. Posted by Abh (had 226 views)

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi Abhay,

    Unfortunately, as previously mentioned, we do not officially support FoxPro, and so we aren’t able to help you further at this point. We apologize for the inconvenience.

    If you are able to reproduce the issue in small stand-alone test project in VB6, VB.NET or C#, then please send it to us (support@xceed.com) and we will be able to give it another look.

    Imported from legacy forums. Posted by Diane [Xceed] (had 1293 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.