X.A.3.5 COM component
The servers must be registered before use. For that purpose, a program called “modifyRegistry.exe” is
distributed with FeResPost library. This program is used to add keys to the Windows register. Follows
some information:
- The component can be registered for the current user only, or for all the users. In the
second case, the registration program should be used on an account that has administrator
privileges.
- The registration program allows to register the component as well as to unregister it.
- The registration program allows the user to select the part that shall be installed
among:
- The in-proc library “FeResPost.dll”,
- The type library “FeResPost.tlb”,
The registration of type library (TLB) is not necessary if the COM component is used from
compiled language. But the user must register the type library to use the component from
interpreted languages VBA, ruby, python...
The standard and recommended configuration involves the registration of the in-proc library
“FeResPost.dll’, and of the type library “FeResPost.tlb”.
- Among the keys and values that are written to the Windows registry, the full paths to the dll, exe
and tlb appear several times. This means that ones the component has been registered, these files
should not be moved. So, a proper location for the FeResPost library should be selected prior to
its registration.
- Several versions of FeResPost COM component can be installed at the same time on the same
computer.
The examples presented in Part VII require only the registration of in-proc library and type library
(recommended configuration).
You may register either 32 bits version of the component, or 64 bits version of the component, or
both 32 bits and 64 bits versions of the component:
- The 64 bits version of the component works on 64 bits Windows only. On the other hand,
the 32 bits version works on 32 bits as well as 64 bits versions of Windows. This means
that the registration of both 32 and 64 bits versions of the COM component is possible
only on 64 bits Windows OS.
- Windows manages the writing of kes in the appropriate directories of the register. For
example, when 32 bits component is registered in 64 bits Windows OS, CLASSES keys
are defined in “HKLM/Software/Wow6432Node/Classes/CLSID” directory.
- The registration is done with “modifyRegistry.exe” executable. The 64 bits
“modifyRegistry.exe” must be used to register the 64 bits library, and the 32 bits
“modifyRegistry.exe” must be used to register the 32 bits library.
- The “dll” library name is the same for 32 bits and 64 bits versio of the component.
Therefore, the two dll files must be located in separate and preferably clearly identified
directories.
- The “tlb” file must be registered only once. For example, a possible scenario is to register
the 32 bits “dll” library and the “tlb” file 32 bits version of “modifyRegistry.exe”, then
use the 64 bits version of “modifyRegistry.exe” to register 64 bits “dll” library.
- It is not always easy to determine whether the 32 bits or the 64 bits version of COM
component is to be used. For example, 64 bits versions of ruby or python seem to require
the 32 bits components that are accessed through “win32ole” or “win32con” extesnions.
Therefore, it may be a good idea to register the two versions.
- When one gets rid of an older version of FeResPost, the 32 bits and 64 bits versions of
the components must be un-registered separately.