Chilkat ActiveX MSI Installers

Chilkat may begin providing .msi installers for the 32-bit and 64-bit ActiveX components. Here are .msi installers for testing:

(version 9.5.0.56)

Chilkat 32-bit ActiveX MSI Installer
Chilkat 64-bit ActiveX MSI Installer

Installing the .msi should register the ActiveX. The .msi also includes the required MSM merge module for the VC++ 2008 runtime.

To check the registration, run the CheckChilkatActiveX.exe program that is located in the install directory
(such as at C:\Program Files (x86)\Chilkat Software, Inc\Chilkat 32-bit ActiveX\CheckChilkatActiveX.exe,
or at C:\Program Files\Chilkat Software, Inc\Chilkat 64-bit ActiveX\CheckChilkatActiveX.exe

How to Register an ActiveX DLL using regsvr32

(Also see the ActiveX DLL Registration Tutorial)

The first step is to determine if you need to register the ActiveX DLL compiled for 32-bit or 64-bit.  If your computer is 32-bit, the choice is obviously 32-bit.  Let’s start with it:

How to Register a 32-bit DLL on a 32-bit Windows operating system

  1. Using a text editor, create a .bat file in the same directory as the 32-bit DLL.
  2. Insert this line in the .bat file:
    regsvr32 "%CD%"\myActiveX.dll
  3. Run the .bat “as Administrator”. regsvr32 will be trying to create entries in the Windows registry, so it may need administrative privileges.* On Windows 7, open an Administrator command prompt by going to the Start Menu, enter “cmd” in the search box and instead of pressing Enter, press Ctrl+Shift+Enter. Change directories to where the DLL’s and the batch script are located, and run the registration batch file from there.

regsvr32 on 64-bit Windows

If the computer is 64-bit Windows, it’s possible you still may need the 32-bit DLL.  It depends on whether your application runs as a 32-bit process or a 64-bit process.  If using the ActiveX from ASP, check to see if IIS is running in 32-bit mode or 64-bit mode.  If 32-bit, the 32-bit ActiveX needs to be registered.  Likewise, if IIS is running in 64-bit mode, register the 64-bit ActiveX DLL.   For VB6 apps, it will always be 32-bit because VB6 is older and there is no such thing as a 64-bit VB6 app.  This may also apply to older versions of other programming languages such as Delphi, FoxPro, etc.

If you are unsure, there is no harm in downloading and registering both 32-bit and 64-bit DLLs.  64-bit Windows has separate registries for 32-bit and 64-bit, so both may be registered.

How to Register a 32-bit DLL on a 64-bit Windows operating system

  1. Using a text editor, create a .bat file in the same directory as the 32-bit DLL.
  2. Insert this line in the .bat file:
    \windows\syswow64\regsvr32 "%CD%"\my_32_bit_ActiveX.dll

    It is the 32-bit version of regsvr32 that must be used to register the DLL in the 32-bit registry. We use the full path to regsvr32 to make sure we’re running the 32-bit version.

  3. Run the .bat “as Administrator”.* On Windows 7, open an Administrator command prompt by going to the Start Menu, enter “cmd” in the search box and instead of pressing Enter, press Ctrl+Shift+Enter. Change directories to where the DLL’s and the batch script are located, and run the registration batch file from there.

How to Register a 64-bit DLL on a 64-bit Windows operating system

  1. Using a text editor, create a .bat file in the same directory as the 64-bit DLL.
  2. Insert this line in the .bat file:
    \windows\system32\regsvr32 "%CD%"\my_64_bit_ActiveX.dll

    It is the 64-bit version of regsvr32 that must be used to register the DLL in the 64-bit registry. We use the full path to regsvr32 to make sure we’re running the 64-bit version.

  3. Run the .bat “as Administrator”.* On Windows 7, open an Administrator command prompt by going to the Start Menu, enter “cmd” in the search box and instead of pressing Enter, press Ctrl+Shift+Enter. Change directories to where the DLL’s and the batch script are located, and run the registration batch file from there.

Using regsvr32 to Register a 32-bit ActiveX or 64-bit ActiveX on Windows 64-bit System

A 64-bit Windows system has two separate registries — one for 32-bit processes, and one for 64-bit processes. The reason for this is simple: Let’s say your application instantiates an instance of an ActiveX component by calling CreateObject(“Chilkat.Ssh”). If your application is running in a 32-bit address space, the registry entries for “Chilkat.Ssh” should point to a 32-bit DLL in the filesystem. However, if your application is running in a 64-bit address space, the registry entries should point to a 64-bit DLL. The only possible way to do it is to have separate registries — one for 32-bit and one for 64-bit.

On a Windows 64-bit computer, the regsvr32 program (located in \windows\system32) is a 64-bit program that registers a 64-bit ActiveX DLL using the 64-bit registry. For example:

regsvr32 ChilkatSsh_x64.dll

On Windows x64, regsvr32 expects a 64-bit DLL and updates the 64-bit registry.

To register a 32-bit ActiveX DLL in the 32-bit registry, you’ll need to run the regsvr32 located in \windows\syswow32. For example:

cd \windows\syswow64
regsvr32 c:\ChilkatSsh.dll

It’s important to know whether the program that will be loading the ActiveX is 32-bit or 64-bit. For example, IIS on Windows 64-bit can run as either. If IIS is running in 32-bit mode, any ActiveX’s used in your ASP pages should be 32-bit DLL’s registered in the 32-bit registry. Likewise for 64-bit.

The same conditions apply for other environments, such as SQL Server 2008. Is the database server running as a 32-bit process or 64-bit process? If an ActiveX is used within a stored procedure, make sure the appropriate DLL is registered to the appropriate registry…

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 is written in C# or VB.NET (i.e. it is a .NET application), then you simply add a reference to the Chilkat assembly (such as ChilkatDotNet2.dll) within your Visual Studio project. If you need to use the ActiveX component from other languages, such as VB6, ASP, FoxPro, Delphi, etc., then download the ActiveX from http://www.chilkatsoft.com/downloads.asp and install. If the ActiveX DLL is already installed and you need it on another computer, you may simply copy the ActiveX DLL and register with regsvr32. Please read this blog post about using ActiveX components on win32 / x64.