(FTP) WSAEACCES An attempt was made to access a socket in a way forbidden by its access permissions

Question (solution is below) Today one of my customer’s got the following connect error when running my application. This same application works just fine on my system as well as almost 100 others. It had run correctly on her computer until she installed an upgrade. The connect error is: Port: 21 Host: www.***.com sockError: 10013 Connect: failed WSAEACCES An attempt […]

FTP Upload Speed

Question: We’re rather puzzled by what appears to be capped speeds on uploads, despite no cap being set. Testing uploads, we’re seeing about 350 KB/s via the Ck library to our (local network) FTP server. A FileZilla transfer of the same file to the same server can happily hit up to 7MB/s. I realize Ck supports bandwidth throttling, but those […]

VB6 – SHA-1 Hash and Base64 Encode

Private Sub Command1_Click() Dim crypt As New ChilkatCrypt2 success = crypt.UnlockComponent(“30-day trial”) If (success = 0) Then MsgBox crypt.LastErrorText Exit Sub End If Dim plainText As String plainText = “To be SHA-1 hashed…” crypt.EncodingMode = “base64” ‘ Hash the string and base64-encode in 1-Step Text1.Text = crypt.HashStringENC(plainText) ‘ Now do it in 2-steps. Should produce the same results as for […]

C++ String Compression: PPMD, Deflate, BZip2, LZW

This C++ example demonstrates string compression using four different compression algorithms: PPMD, Deflate, BZip2, and LZW. void TestCompression(const char *algorithm) { CkCompression comp; comp.put_Algorithm(algorithm); printf (“algorithm: %s\n”,algorithm); CkByteData compressedData; comp.CompressString(“abc abc abc abc abc abc abc abc abc abc abc 123 123 abc 123”,compressedData); // Get the compressed data: const unsigned char *pCompressedData = compressedData.getBytes(); unsigned long numBytes = compressedData.getSize(); […]

Multipart/signed Email Handling

When a signed and/or encrypted email is loaded from a file or downloaded from a mail server, it is automatically verified and/or decrypted.   The results are stored in various properties of the email object, and the email object is available in its unencrypted/unsigned form.  This means that your application can process signed/encrypted emails in the same way as non-signed/non-encrypted email.  […]

Forcing Web Server to Deliver Fresh (Non-Cached) Response

To force a web server to send a fresh copy (not a cached copy) of the requested document, add a “Pragma: non-cache” HTTP header to the request. If sending a HTTP GET request via these methods: QuickGet, QuickGetStr, Download, etc., then add the Pragma header by calling httpObject.SetRequestHeader(“Pragma”,”no-cache”) prior to sending the GET. If the Chilkat HTTP Request object is […]

Zip Compress JPG?

Question: May I know that which Zip method in your component could give the best compression? We are trying to Zip some JPEG, and perhaps could reduce the size by half or more. Answer: The JPG file format is already a compressed format, so usually very little is gained in trying to compress it — the result is a lot […]

VB.NET Compress String to Byte Array

Demonstrates how to use Chilkat.Compression to compress a string to a byte array: Private Sub CompressStringToBytes() Dim compress As New Chilkat.Compression() ‘ Any string argument automatically begins a 30-day trial. Dim success As Boolean success = compress.UnlockComponent(“30-day trial”) If (success <> True) Then MsgBox(“Compression component unlock failed”) Exit Sub End If ‘ Use the “deflate” algorithm, which is the algorithm […]

UnlockComponent or UnlockBundle returns False/0

If UnlockComponent or UnlockBundle fails, check the following.  (For more information about how UnlockComponent works, please read this:  How UnlockComponent works. You must pass the exact unlock code provided in your receipt email.  The unlock code is case sensitive.  If  you are confident that you are passing the correct unlock code to UnlockComponent (or UnlockBundle), but it returns a failed […]