FeResPost Web Site                     FeResPost Online User Manual

X.A.4.5 COM component

Two solutions are proposed for the registration or un-registration of the COM component. One can use “modifyRegistry.exe”. Registration or un-registration is also possible using “reg” files.

X.A.4.5.1 Registration of COM component with “modifyRegistry.exe” program

COM server 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 registry. Some information follows:

The examples presented in Part VII require only the registration of in-proc library and type library (recommended configuration).

Figure X.A.1 shows the window created by the "modifyRegistry.exe" program. After clicking one of the registration buttons, the program shows an information message allowing to check the correct installation of COM component (Figure X.A.2 or X.A.3). In many cases, failure is related to the impossibility of loading FeResPost library.


PICT

Figure X.A.1: Registration of FeResPost COM component.


PICT

Figure X.A.2: Successful registration of FeResPost COM component.


PICT

Figure X.A.3: Failed registration of FeResPost COM component.

You may register either 32-bit version of the component, or 64-bit version of the component, or both 32-bit and 64-bit versions of the component:

X.A.4.5.2 Registration with “reg” files

FeResPost COM component is delivered with registration files in the “OUTPUTS/COM/REGFILES” directory. Four such files are available: “addAllUsers.reg”, “addCurrentUser.reg”, “removeAllUsers.reg” and “removeCurrentUser.reg”. The four files can be distinguished according to two criteria:

Before using the reg files that add information to Windows registry, you must ensure that the paths to “FeResPost.dll” and “FeResPost.tlb” match what their actual location on your computer. For example, the registry files delivered with COM binaries contain this kind of information:

 [HKEY_CURRENT_USER\Software\Classes\TypeLib\{0A88E969-53D5-492B-FABB-A0DF12862BE8}\1.0\0\win32]
 @="C:\\Users\\ferespost\\Documents\\SRC\\OUTPUTS\\COM\\lib\\FeResPost.tlb"
 ...
 [HKEY_CURRENT_USER\Software\Classes\CLSID\{52FEFC92-63E7-4500-768B-84B08E1262C1}\InprocServer32]
 @="C:\\Users\\ferespost\\Documents\\SRC\\OUTPUTS\\COM\\lib\\FeResPost.dll"
 "ThreadingModel"="apartment"

(Of course, the paths must be modified to match your installation.)

The sources come with a ruby script that is used to generate the registration files. The script can be used as follows:

 ruby bin/createRegFiles.rb  C:/Users/ferespost/Documents/SRC
   C:/Users/ferespost/Documents/SRC/OUTPUTS/COM 5.0.7 32

The three arguments of the ruby script are: