Delphi Binary Data

This post shows some code snippets for getting data from Delphi Byte arrays (TBytes) and TMemoryStream’s in and out of Chilkat. First, here are some code snippets to convert from a TMemoryStream to a byte array, and back. Delphi TBytes to TMemoryStream var iStream: TMemoryStream; b: TBytes; OpFile: String; numBytes: Cardinal; begin // Load a file into bytes OpFile := […]

Convert CkDateTime to Delphi TDateTime

Question: Which is the best way to convert a CkDateTime to a Delphi TDateTime? Answer: I didn’t know the answer, so I Googled “Delphi TDateTime” to see exactly what it is.  It brought me to this web page:  http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/System_TDateTime.html In Delphi, TDateTime is a type that maps to a Double. In C++, the TDateTime class corresponds to the Delphi TDateTime […]