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 Using a text editor, create a .bat file […]

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 […]

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 […]

Using 32-bit or 64-bit ActiveX Components on x64 Windows

64-bit Windows is capable of running applications in both 32-bit mode and 64-bit mode. If the application process is running in a 32-bit address space, the DLL must also use a 32-bit address space. (In other words, it should be a DLL compiled for the Win32 platform.) If the application process is running in a 64-bit address space, the DLL’s […]

ActiveX on 64-bit OS; Which to use: 32-bit DLL or 64-bit DLL?

Question: Help clarify something for me please. I develop in a 32bit environment, but deploy to windows 2003/2008 64bit servers. Do I install the 64bit or the 32bit ActiveX on the servers? Answer: In Visual Studio C/C++ applications, you may target either win32 or x64. If your application targets win32, you should register (using regsvr32) and use the 32-bit Chilkat […]

regsvr32 0x80020009 error and solution

Question: I am having a problem registering the ChilkatCrypt2.dll and ChilkatMail_v7_9.dll files using regsvr32. I get the following error message: 0x80020009 I am using Windows Server 2008 R1 and will also need to register on 2008 R2 (have not tried yet). Solution: Regsvr32 needed to be run in a command window that was run as an administrator. Also: Regarding regsvr32 […]

Cleaning up ActiveX Objects in Delphi — calling Free

When a Chilkat object is declared using “TChilkat*” such as TChilkatSFtp, and it is instantiated dynamically, then it must be explicitly freed (destroyed). The following code fragment demonstrates. If the Free method is not called, then object instances will accumulate in memory. procedure TForm1.Button1Click(Sender: TObject); var sftp: TChilkatSFtp; i: Integer; begin for i := 1 to 1000 do begin sftp […]

How to use an ActiveX in VB6

There are two ways to reference an ActiveX in Visual Basic 6.0.  The first is to select “Project–>References” from the VB6 menu.  The second way is to select “Project–>Components…” from the VB6 menu. Important:  You should do one or the other, but not both. Which do you choose?   Use “Project–>References” if you are going to instantiate the ActiveX dynamically.  In […]