Create Amazon CloudFront Signed URL in VBScript (for ASP)

This sample code snippet is graciously provided by a Chilkat customer: See Also: Chilkat RSA ActiveX Reference Documentation … resource = “http://*********.cloudfront.net/something.jpg” ‘Expiration expiration = 1278680686 ‘Policy policy = “{“”Statement””:[{“”Resource””:””” & resource & _ “””,””Condition””:{“”DateLessThan””:{“”AWS:EpochTime””:” & _ expiration & “}}}]}” ‘Chilkat Component set pkey = Server.CreateObject(“Chilkat.PrivateKey”) ‘Load the private key from an RSA PEM file: private_key = pkey.LoadPemFile(“c:\pk-xxx.pem”) ‘Get the […]

Adding a Callback Event Handler in VB.NET

Dim “WithEvents” Dim WithEvents ftp As Chilkat.Ftp2 Add some code to create a new instance of the object. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ftp = New Chilkat.Ftp2() ftp.EnableEvents = True ftp.HeartbeatMs = 100 … Select the “ftp” object. Select the event. This causes Visual Studio to generate the event handler function. Add your […]

FTP Auth TLS / SSL problem caused by Firewall Restrictions

The following Chilkat FTP2 error was found by a Chilkat customer to be caused by firewall restrictions. I do not know the specifics of the firewall restrictions that caused the error, but the LastErrorText (with all customer information removed) is reproduced here to help identify this problem in the future. The important point is to see that the SSL/TLS handshake […]

MHT and EML are both MIME

Question: I have added HTML email file support (thanks to your excellent examples and library), but I have a question. It appears that it might be easier for the end user to save their things they want to email as a MHT file instead of HTML out of MS-Word. That way they have one file to deal with. So is […]

CodeGear C++ Builder: Passing Strings to COM / ActiveX Methods

The correct way to pass a string to a COM/ActiveX method is to use “WideString (theString).c_bstr()” because ActiveX controls/components require BSTR’s, and not strings.  BSTR’s are wide strings (Unicode) where the length of the string precedes the string in memory. The C++ Builder code to pass a string to an ActiveX function is as follows: FClientSock = new TChilkatSocket(Owner); success […]

PercentDone callback counts as an AbortCheck

Question: “I’ve got the Chilkat C++ libs linked with my project, and am using the HTTP classes successfully. One thing is confusing me, though. I’ve derived a class from CkHttpProgress.h and overridden AbortCheck(…) to provide cancellation support. However, AbortCheck(…) never gets called. At first, I thought perhaps the HTTP retrieval was occurring too quickly, so I set the “HeartbeatMs” property to “1”, and it […]

A .NET Assembly is *not* an ActiveX. It is not registered via regsvr32.

Question: I have now tried to register the component manually, but then I get his message: “The module c:\…\ChilkatDotNet2.dll was loaded but the entry-point DllRegisterServer was not found. Make sure that c:\…\ChilkatDotNet2.dll is a valid DLL or OCX file and try again.” Answer: A .NET assembly is not an ActiveX component. It is not registered with regsvr32. If your application […]

Modify Email on IMAP Server?

Question: I was wondering how it would be possible to make changes to an email on the server. Answer: Once an email is on a server, it cannot be modified.  This is not a Chilkat limitation, but it’s the way mail servers work.  However, with IMAP you may download an email, make changes, upload the new email to the mailbox […]