Archived Forum Post

Index of archived forum posts


ftp2.dll install location

Jul 02 '12 at 10:51

Can I install the ftp2.dll in the windows/system folder. The Access reference library references Program Files (x86)Chilkat Software, Inc. ..... Do I need to install to the same folder on my users computer or can I put it in the system folder and change the library license.


Before answering the question, it's important to have a basic understanding of ActiveX DLL registration. In a nutshell, programs that instantiate an ActiveX object do so by some sort of "CreateObject" statement, passing a name such as "Chilkat.Email" to the CreateObject statement/function. The syntax may vary amongst different programming languages, but they are all the same in that a name is passed to some sort of "create object" call.

To instantiate an object, the CreateObject must lookup the path to the DLL in the registry. This is the point of ActiveX registration -- to create a key in the registry such that you can lookup by name ("Chilkat.Email") to get a path to the DLL, such as C:/blah/blah/blah/ChilkatEmail2.dll. If the name is found and the DLL is located at the indicated path, it is loaded and dynamically linked into the address space of the application.

The answer to your question is that you may put an ActiveX DLL anywhere you desire, as long as the registry entry created in the ActiveX registration points to the correct location of the DLL.

There is one important caveat: The DLL should be in a directory that is fully trusted. It shouldn't be on a remotely mounted filesystem. The Windows/System folder is certainly going to be trusted, which is why some developers may copy ActiveX DLL's to that location. My recommendation however, is to never touch the Windows/System directory. Don't clutter it up with application-specific DLL's. It's better to place them in some other directory, or create your own, such as "C:/ActiveX_DLLs".