This section describes the preferred distribution method when shipping SftTabs/OCX with your application. This method follows Microsoft's guidelines on ActiveX control distribution. While these guidelines are not enforced, it is highly recommended that they are followed as outlined here. This ensures that your application can be safely installed and use SftTabs/OCX even if another vendor has already installed an application which also uses SftTabs/OCX.
Supported platforms include Windows 10, Windows 11 and their server editions.
When distributing SftTabs/OCX with your application, only the following files can be distributed with your application royalty-free. These files allow the use of the control with your application. The design-time interface is no longer available once SftTabs/OCX is shipped with your application. For additional information regarding distributing this control with your application, see the license agreement.
Important: Redistributable files are located in the SftTabs/OCX installation directory (\Program Files (x86)\Softelvdm\SftTabs OCX 7.0\Redist).
The OLE system files used by ActiveX controls (Oleaut32.dll and others) are part of Windows and must not be distributed. The following files are available for distribution with your application:
| File Name | Target Folder | Description |
|---|---|---|
| SftTabs_IX86_U_70.ocx | See Control Target Directory below | Required for 32-bit applications. SftTabs/OCX control (32-bit), used by applications developed using Visual Basic 6.0. |
| SftTabs_x64_U_70.ocx | See Control Target Directory below | Required for 64-bit applications. SftTabs/OCX control (64-bit). Note: This file cannot be used with Visual Basic 6.0, which creates 32-bit applications only. |
The Visual Basic 6.0 run-time files your application needs are not part of SftTabs/OCX. Please see the Visual Basic documentation.
Certain features of the control require GDI+ support. GDI+ is available automatically on all supported Windows platforms.
One of the following target directories can be chosen.
The setup program you provide with your application should install the SftTabs/OCX control SftTabs_IX86_U_70.ocx into the Windows System directory for 32-bit files. The directory name can be found using the GetSystemDirectory API function in a 32-bit setup program. On the 64-bit versions of Windows, this directory is usually named C:\Windows\SysWOW64.
The control is installed into this directory and registered using proper versioning and reference counting of the OCX file (usually automatic, with most commercial installers).
An ActiveX control can be installed in the application directory using DLL/COM redirection.
DLL/COM redirection is activated on an application-by-application basis by the presence of a ".local" file. The ".local" file is an empty file in the same directory as the application's .exe file, with the same name as the application's .exe file with ".local" appended to the end of the name.
For example, to activate DLL/COM redirection for an application called "SampleApp.exe", create an empty file called "SampleApp.exe.local" in the same directory where SampleApp.exe is installed.
"Registration-Free Activation" (see below) can be used, which eliminates the need for the ".local" file.
Once DLL/COM redirection is activated, whenever the application loads a DLL or an OCX, Windows looks first for the DLL or OCX in the directory where the application's .exe file is installed. If a version of the DLL or OCX is found in the directory where the application's .exe file is installed, the application uses it regardless of any directory path specified in the application or the registry.
Even if DLL/COM redirection is used, the control must be registered during installation (see "Registering SftTabs/OCX" below). The control must be installed into the Windows System directory and registered using proper versioning and reference counting of the OCX file (usually automatic, with most commercial installers). In addition, a private copy in your application directory is always installed (but not registered).
The setup program should only install the SftTabs/OCX files if the version number in the new files is higher than the files already installed. Maintenance releases of the product are fully upward compatible and are guaranteed to have a newer version number. New versions of the product use new file names and new GUIDs so there is no conflict between different (major) versions, such as 6.0, 6.5 and 7.0.
When installing DLLs or OCX files into a "shared" location, such as the Windows\System32 or \Windows\SysWOW64 directory, proper reference counting must be performed, to ensure that the file isn't uninstalled until all applications making use of the DLL or OCX have also been uninstalled. Reference counting is generally available with most commercial installers. The Windows Registry contains a count of all such shared files in the following Registry location:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs
One of the following ActiveX/COM registration methods can be selected.
The setup program should register SftTabs/OCX in the Windows registration database (Registry). This can be done manually using Regsvr32.exe which is discouraged. Many commercially available setup programs can register SftTabs/OCX during the installation of your application. Please keep in mind that 64-bit versions of Windows have two versions of RegSvr32.exe. \Windows\SysWOW64\RegSvr32.exe is used to register 32-bit controls such as SftTabs_IX86_U_70.ocx.
SftTabs/OCX is a self-registering ActiveX control. By using the LoadLibrary Windows API function, the GetProcAddress API can be used to obtain the DllRegisterServer function. By calling this function, the SftTabs/OCX control will register itself with the Windows registration database (Registry). Most commercially available setup programs have support for this built-in. Check the documentation of your setup application.
The following files need to be registered in this manner:
| File Name | Description |
|---|---|
| SftTabs_IX86_U_70.ocx | SftTabs/OCX control (32-bit) |
| SftTabs_x64_U_70.ocx | SftTabs/OCX control (64-bit). This file cannot be used with Visual Basic 6.0. |
It is possible to deploy this ActiveX control using "Registration-Free Activation". Registration-free activation allows distribution of the control without the requirement to register the ActiveX control in the Windows Registry (using REGSVR32 or a Setup application). Registration-free activation is supported by the operating system.
By using registration-free activation, true XCOPY deployment is possible. Your application uses its own copy of the control. Versioning, reference counting and registration of the control are completely eliminated and other installed versions of the control cannot interfere with your application.
By using an application manifest and copying the OCX file SftTabs_IX86_U_70.ocx into your application directory, the ActiveX control is located automatically when it is used. Your application manifest must include the comClass and typelib definitions shown below. These ensure that your application uses the control located in your application directory, regardless of other versions that may be installed on the system.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="x86" name="SoftelvdmInc.SftTabsOCX70.Sample.exe" type="win32" />
<description>SftTabs Sample Application</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0"
processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly>
</dependency>
<file name="SftTabs_IX86_U_70.ocx">
<comClass description="SftTabs/OCX 7.0 Tab Control" clsid="{{87A0D75C-C489-4BA3-BF2A-77F2A93C1C3A}}"
threadingModel="Apartment"
miscStatus="setclientsitefirst,simpleframe,alignable,activatewhenvisible,insideout,cantlinkinside,recomposeonresize"
progid="SftTabsOCX70.SftTabs.1" tlbid="{{9B787CF3-B2CF-417B-844B-90040FFCB281}}"/>
<typelib tlbid="{{9B787CF3-B2CF-417B-844B-90040FFCB281}}" version="7.0" helpdir=""/>
</file>
</assembly>If you test the installation of your application's Setup program on a system where the development version of SftTabs/OCX is installed, you may notice that you can no longer use SftTabs/OCX in your development environment. This is caused by the fact that your Setup program installed a "run-time only" control on your system, which has replaced the "design-time" or development version of SftTabs/OCX. You can reinstate (or re-register) the design-time version of SftTabs/OCX by using the program entry "Maintenance, Register SftTabs OCX in Windows Registry" in the SftTabs OCX 7.0 program group.