procedure RegisterServer(const Is64Bit: Boolean; const Filename: String; const Reserved: Boolean);
Registers the DLL/OCX with the specified filename. If Is64Bit is True, the DLL/OCX will be loaded as a 64-bit image and registered in a 64-bit process. Raises an exception if not successful.
Parameter Reserved is ignored, but must be specified anyway.
begin
// Register hhctrl.ocx located in the System directory.
RegisterServer(Is64BitInstallMode, ExpandConstant('{sys}\hhctrl.ocx'), False);
end;
Because we specify Is64BitInstallMode in the first parameter, it will register the 64-bit OCX in the 64-bit System directory when Setup is running in 64-bit install mode. Otherwise, it will register the 32-bit OCX in the 32-bit System directory.