x64 ActiveX Registration on Windows 2008 Server
For the most part, a 32-bit Chilkat ActiveX DLL will run on a 64-bit computer. However, there is an issue (to be explained here) that requires the ActiveX to be built specifically for x64. Chilkat provides separate 64-bit ActiveX’s on it’s downloads web page, and these should be used on x64 systems.
The problem occurs when a method returns an ActiveX object. For example, the ChilkatMailMan2.CopyMail method returns a ChilkatEmailBundle2 object.
The registry in 64-bit versions of Windows is divided into 32-bit and 64-bit keys. (see http://support.microsoft.com/kb/305097) When a 32-bit Chilkat ActiveX creates the COM object to be returned, it uses the 32-bit registry keys. However, when the ActiveX was originally installed (using regsvr32 or Component Services) the 64-bit registry keys are created. Therefore, the internal error returned by Chilkat indicates that the ActiveX is not registered. It’s very confusing because it is possible to create the object via Server.CreateObject (in ASP) or CreateObject (in VBScript). This works because CreateObject is running in a 64-bit environment and is looking in the 64-bit registry keys. The problem occurs if a 32-bit DLL (or executable) calls CoCreateInstance internally to instantiate the ActiveX — in that case it fails because it’s looking in the 32-bit registry keys.
The solution: Make sure you use the x64 ActiveX’s on x64 computers, and the win32 ActiveX’s on 32-bit computers.