Home › Forums › ActiveX components › Xceed Zip for ActiveX & x64 › Xceed in FoxPro 9.0 with Compression in Memory
-
AuthorPosts
-
#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)
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.htmlSince 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)
No Not working. Am still scratching my head.
Abhay
Imported from legacy forums. Posted by Abh (had 168 views)
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.cCompDataAbhay
Imported from legacy forums. Posted by Abh (had 226 views)
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)
-
AuthorPosts
- You must be logged in to reply to this topic.