How to Deploy ActiveX Components with your Application
A link to a Chilkat blog post within information about ActiveX DLL deployment:
June 3, 2010
A link to a Chilkat blog post within information about ActiveX DLL deployment:
May 31, 2010
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.
March 15, 2010
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 address space must match — i.e. it should be a DLL compiled for the x64 platform. Just because your application is running on 64-bit Windows does not mean it requires a 64-bit DLL — the determining factor is the process’s address space.
For example, let’s say you’ve configured IIS to run its worker processes in 32-bit mode. In that case, your ASP apps would require 32-bit DLLs. If IIS is running in 64-bit mode, then 64-bit DLLs are needed.
About the Windows registry and ActiveX:
A 64-bit Windows system has two separate registries — one for 32-bit processes, and one for 64-bit processes. The reason for this makes sense if you think about it.. 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. How can you do both with one registry? The answer is to have separate registries — one for 32-bit and one for 64-bit.
Therefore, when you register a DLL with regsvr32 — did you register the 32-bit DLL in the 32-bit registry, or did you register the 64-bit DLL in the 64-bit registry? You’ll need to get it right. When you run regsvr32 on an x64 system, you’re running the 64-bit version by default. (That’s a bit confusing because of the “32″ in the regsvr32 name…) To run the 32-bit regsvr32, do this:
cd \windows\syswow64 regsvr32 c:\filename.dll
(Note the stupidity of it all — the default regsvr32 is 64-bit and resides in the \windows\system32 directory. Note the “32″ in system32 and the “32″ in regsvr32 — quite misleading. However the 32-bit version of regsvr32 is found in the \windows\syswow64 directory. Note the “64″ in the directory name. That’s also misleading. Ughhh!)
More information about: regsvr32 or ActiveX object creation errors.
December 3, 2009
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 ActiveX DLL for both win32 and x64 systems. If your application targets x64, then you must register and use the x64 Chilkat ActiveX DLL and it may only run on 64-bit systems.
December 2, 2009
Question:
I am having a problem registering the ChilkatCrypt2.dll and ChilkatMail_v7_9.dll files using regsvr32.
I get the following error message: 0×80020009
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 / ActiveX registration problems, see this blog post: regsvr32 problems.
October 28, 2009
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 := TChilkatSFtp.Create(Self);
// ....
sftp.Free();
end;
end;
end.
October 8, 2009
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 other words, you’ll be creating the object dynamically using the New statement. Such as:
Dim mailman As New ChilkatMailMan2 Dim mm as ChilkatMailMan2 Set mm = New ChilkatMailMan2
Use “Project–>Components…” if you are going to drop an instance of the component onto a Form. When you include an ActiveX using “Project–>Components…”, you’ll see icons added to your toolbox. In this case, you’ll see an icon for the Chilkat MailMan object. You would drag this onto your Form. Adding an ActiveX in this way only makes sense if the component has a visual interface. The Chilkat ActiveX components are non-visual, so there is no point in doing it this way, and I would highly recommend adding a Reference and instantiating the object instances dynamically using the New statement.
Common Errors:
If you add the ActiveX via “Project–>Components…” and then try to instantiate an object dynamically using the New statement, you’ll get the “Invalid use of New keyword” error.
If you don’t add the ActiveX to your project in any way, (i.e not through “Project–>References” nor through “Project–>Components…”, you’ll get the “User-defined type not defined” error.
September 24, 2009
The content at the following link is often referred to but hard to find, so I am posting a link from here:
Deploying an ActiveX with your Application
September 21, 2009
If you see the following error on a Dim statement such as the following:
Dim sa as New CkStringArray

Make sure you add a reference to the appropriate Chilkat ActiveX. Select “Project–>References” from the VB6 menu and then check the checkbox next to the Chilkat ActiveX component to be referenced. (Select “Chilkat Util” for the CkStringArray object.) The complete mapping of objects to DLL’s is found here: Mapping of Chilkat Objects to DLLs.
September 17, 2009
Question:
I want my web hosting company to install your XML and Encryption controls on the server so I can use the ASP code.
They are asking me the following question.
“Can you verify with them that they support Windows Server 2003 and SQL 2005? IO am not seeing these listed on their site.”
Answer:
Yes, all of the Chilkat ActiveX components will run on Windows Server 2003 and they may be used from SQL Server 2005.