login about faq

Hi Chlkat,

You said in a previous post Chilkat 9.5 Missing CkData CkDataArray that you might be able to suggest an alternative to ckData if I told you what I used it for. I am at the point now were I need that alternative. My company just migrated the development server to a 64bit 2012 from a 32bit 2003. The latest version of 9.5 64bit works great and global search replace for the class name is easier then expected.

The sticking point is ckData. The 64bit version of 2.6 registers okay and will test with a vb script test file. It is ASP pages that choke "Server Can Not Create Object".

Here is what I use it for in ASP. I have a class that fetches files for users. The file structure setup in that there is no direct URI to the files. The files are on NAS or in the "cloud" with RackSpace CloudFiles (think AWS). ckData is the glue of this class because it is versatile. I check a database for the file id and then know to load the files from the NAS (ckData.LoadFile()) or make a http call to CloudFiles (ckData.LoadBinary HttpResponse.Body). Once If have the data, I can either push it to the browser (response.BinaryWrite ckData.GetBinary) or to my PDF component to merge more pages or add a stamp (mypdf.read ckData.GetBinary).

I also have a vb program that uses ckdata as the glue between ftp and http. The program downloads files from a ftp site (ckData.LoadBinary Ftp2.GetRemoteFileBinaryData(file_name)) and then sends the data to CloudFiles (HttpRequest.LoadBodyFromBytes ckData.GetBase64).

All in All ckData is a very useful library for holding and manipulating binary and base64 data. I am surprised that I am the only only who seems to be missing this utility. Since it is mostly pdf data, I have tried using the pdf object, it has .read and .data for base64 but it heavy and sometimes leaks memory.

asked Jun 05 '15 at 20:48

emartinson's gravatar image


Just now, I added the BinData class to fulfill the need. Here's a new ActiveX build:

32-bit Download: http://www.chilkatsoft.com/download/preRelease/ChilkatAx-9.5.0-win32.zip
64-bit Download: http://www.chilkatsoft.com/download/preRelease/ChilkatAx-9.5.0-x64.zip

This class is only part of the ActiveX API. Here's the online reference documentation:


Please let me know if you have any trouble. :)



answered Jun 06 '15 at 11:26

chilkat's gravatar image

chilkat ♦♦

Thanks Matt. I am going to give it a try right now.

(Jun 08 '15 at 13:10) emartinson

@Matt. Would it be possible to add .GetChuck(offset, size), .NumBytes() and .LoadFromFile(filename)?

(Jun 08 '15 at 13:27) emartinson

Could you also add a .Save method in the next version?

(Aug 25 '15 at 20:03) emartinson

(Erik, thanks -- I really appreciate the purchase today.) I'll add these features today if possible.


answered Jun 08 '15 at 15:51

chilkat's gravatar image

chilkat ♦♦

Not a problem. I always forget and have to ask my accounting dept when I last re-licensed.

(Jun 08 '15 at 16:14) emartinson

answered Jun 08 '15 at 18:17

chilkat's gravatar image

chilkat ♦♦

Matt, I was getting a connection time-out when I used response.write oBin.GetBinary. While randomly trying things, I added response.flush and it worked. I am wondering if oBin.NumBytes is counting differently than the previous version or binary length is different that the bytes size?

(Jun 11 '15 at 20:26) emartinson

No, it returns the binary data exactly the same way as would any Chilkat method that returns binary data. The NumBytes is the actual number of bytes contained, and any ActiveX method that returns binary bytes is returning a Variant that contains the byte array. I think you should be doing Response.BinaryWrite (see https://msdn.microsoft.com/en-us/library/ms524318%28v=vs.90%29.aspx) The BinaryWrite method takes a "parameter is of type VT_ARRAY | VT_UI1, which is a variant array of unsigned one-byte characters" which is exactly what is returned by BinData.GetBinary.

(Jun 11 '15 at 21:52) chilkat ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jun 05 '15 at 20:48

Seen: 1,059 times

Last updated: Aug 25 '15 at 20:03

powered by OSQA