Socket SendString (C++) w/ TCHAR

Question: I need to send a unicode string (e.g TCHAR *ptr) but the API only allows to send char. Answer: /* The _TCHAR data type is defined conditionally in Tchar.h. If the symbol _UNICODE is defined for your build, _TCHAR is defined as wchar_t; otherwise, for single-byte and MBCS builds, it is defined as char. */ bool sendString(CkSocket &sock, TCHAR […]

Cleaning up ActiveX Objects in Delphi — calling Free

When a Chilkat object is declared using “TChilkat*” such as TChilkatSFtp, and it is instantiated dynamically, then it must be explicitly freed (destroyed). The following code fragment demonstrates. If the Free method is not called, then object instances will accumulate in memory. procedure TForm1.Button1Click(Sender: TObject); var sftp: TChilkatSFtp; i: Integer; begin for i := 1 to 1000 do begin sftp […]

Chilkat 9.0.6 Release Notes

The following changes, fixes, and new features are available in version 9.0.6. General Items listed here are fixes or enhancements in underlying internal code that may apply to one or more Chilkat products. Charset (i.e. character encoding) detection for HTML is determined by the presence of META HTML tag such as this: <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″> For XHTML documents, the […]

SFTP ReadFileBytes not returning all the data?

Question: I’m just beginning to work with some of the Chilkat components and I’ve run into an apparent issue with the ReadFileBytes method in the ChilkatSFtp component. I’m attempting to read an entire file using ReadFileBytes and only getting part of the file. Here’s essentially what I’m doing: * Use GetFileSize32 to get the size of the file (returns 168914) […]

Installing the SMTPQ Windows Service

Question: I’m trying to install SMTPQ on Windows Server 2008 only nothing happens. It won’t install the service, no messages, nothing. Answer: Download and install the Chilkat SMTPQ service from this URL: http://www.chilkatsoft.com/downloads_misc.asp The SMTPQ Windows Service is not installed (intentionally). To complete the install, click on the Windows Start menu button (bottom left of desktop) and select “All Programs–>Chilkat–>SMTPQ […]

Chilkat 9.0.5 Release Notes

Cert and CertStore Fix: Auto-cleanup of private key in \Documents and Settings\{User}\Application Data\Microsoft\Crypto\RSA\S-* when calling Cert.LoadPfxData or Cert.LoadPfxFile. (.NET) Cert.Dispose and CertStore.Dispose will clear internal object and potentially remove private key file if it was temporarily created via LoadPfxData/LoadPfxFile. Email Object Added SetFromMimeBytes method — allowing an email to be loaded directly from a byte array containing raw MIME. FTP2 […]

Non-recursive Directory Tree Traversal

ASP: Iterate over Files and Directories in Filesystem Directory Tree SQL Server: Iterate over Files and Directories in Filesystem Directory Tree C#: Iterate over Files and Directories in Filesystem Directory Tree C++: Iterate over Files and Directories in Filesystem Directory Tree MFC: Iterate over Files and Directories in Filesystem Directory Tree C: Iterate over Files and Directories in Filesystem Directory […]