GZip Inflate/Deflate vs Compress/Uncompress clarification

In a nutshell, a GZIP file consists of a header followed by compressed data (using the “deflate” compression algorithm), followed by a trailer. The GZIP file format is specified here: GZIP file format. The Chilkat GZip component’s Compress* and Uncompress* methods read and write the GZIP file format. Data passed to an Uncompress* method should contain the header, compressed data, […]

HTML-to-XML Conversion: DropTagType clarification.

Question: I instantiated the HtmlToXml component correctly but the DropTagType method did not drop the HTML tags as I expected: Htmltoxml.DropTagType(“span font p I”) Htmltoxml.DropTagType(“<span> <font> <p> <I>”) Answer: Call DropTagType once for each type of tag to be dropped (i.e. discarded) from the output. The tag string is case-insensitive: Htmltoxml.DropTagType(“span”) Htmltoxml.DropTagType(“i”) Htmltoxml.DropTagType(“p”) Htmltoxml.DropTagType(“font”)

Mail not sent when SendEmail returns success?

Question: Looks to me like sendmail is returning true before the message has been sent but I’m sure you’ll tell me that there is no way this can happen… Answer: The SendEmail method returned true after the email was successfully handed over to the SMTP server. When the SMTP server decides to actually forward the email onward to its destination […]

Using X509 Certificate to Encrypt Data

Question: Do you have any examples of using the Chilkat Encryption component with X509 Digital Certificates to encrypt and decrypt data ? Answer: To use an X509 certificate, the CryptAlgorithm is set to “PKI” and you set the certificate by calling SetEncryptCert. The encryption algorithm may be controlled by using a Chilkat CSP object and calling SetCSP. Here’s a quick […]

Does Chilkat Crypt support 3DES? Yes.

Question: Does the Crypt2 Component support 3DES ?? Setting “CryptAlgorithm” to “3des” or “des” does not change the encoded output when the “EncryptStringENC” method is used. Answer: Yes. The CryptAlgorithm should be set to “DES” (case-insensitive). The KeyLength property determines if it is DES (56 or 64), 3DES (112 or 128) or 2-Key TDES (168 or 192). Each byte in […]

Not yet connected to web server. Need to establish connection.

You may see the following message in the Chilkat HTTP component’s LastErrorText property: “Not yet connected to web server. Need to establish connection.” The presence of content in LastErrorText does not indicate an error.  Errors are generally indicated by either false/0 return values, or NULL reference return values.  The LastErrorText (or LastErrorHtml / LastErrorXml) will contain information about what transpired […]

XML “child” Defined

This post clarifies the meaning of “child”. An XML node may have 0 or more child nodes. A child node is a direct descendent of the parent (i.e. it is one level below the parent node). Methods such as NumChildrenHavingTag will return the number of direct descendents (i.e. nodes that are exactly one level below the calling node) that match […]

Google that Error Message

Debugging Hint: In any programming language, in any environment, regardless of whether it’s a Chilkat error message or something from Microsoft, if you don’t understand the error message try Googling it. For example: Type this into Google: “Object Variable or With Block Variable Not Set” (without the quotes) The 1st result provides all the information you’ll need to know about […]

HTTP FollowRedirects and META Refresh

The Chilkat HTTP component’s FollowRedirects property controls whether 301 and 302 HTTP response statuses (i.e. redirect responses) are automatically followed. Pages returning a normal 200 HTTP response status with a META refresh embedded within the HTML are not automatically followed. More about META Refresh: Meta refresh is a method of instructing a web browser to automatically refresh the current web […]