SocketTools Component Redistribution

The SocketTools license permits the use of the scripting components to build application software and redistribute that software to end-users. There are no restrictions on the number of products in which the components may be used. However, if it has been installed with an evaluation license, any products built using it cannot be redistributed to another system until a licensed copy of the toolkit has been purchased.

System Requirements

SocketTools is designed for the Windows platform, and is supported on Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP and Windows 2000. It is recommended that all platforms have the latest available version of Internet Explorer installed, along with all service packs and critical updates.

Windows Server 2008

SocketTools is supported on the Windows Server 2008 platform and requires that the operating system have all critical updates installed. It is recommended that developers review the guidelines for Windows Server 2008 published by Microsoft, including the User Account Control (UAC) security system and its impact on applications. Note that because COM registration modifies restricted areas of the system registry, the components must be installed and registered by an administrator with elevated privileges.

Windows Vista

SocketTools is supported on the Windows Vista platform and requires that the operating system have all critical updates installed. It is recommended that developers install Service Pack 1 (SP1). Developers should review the guidelines for Vista published by Microsoft, including the User Account Control (UAC) security system and its impact on applications. Note that because COM registration modifies restricted areas of the system registry, the components must be installed and registered by an administrator with elevated privileges.

Windows Server 2003

SocketTools is supported on the Windows Server 2003 platform and requires that Service Pack 1 (SP1) be installed with all critical updates. It is recommended that you install Internet Explorer 7.0 which includes security updates for the browser.

Windows XP

SocketTools is supported on the Windows XP platform and requires that Service Pack 2 (SP2) be installed with all critical updates. It is recommended that you install Internet Explorer 7.0 which includes security updates for the operating system and browser.

Windows 2000

SocketTools is supported on the Windows 2000 platform and requires that Service Pack 4 (SP4) be installed with all critical updates. It is recommended that you install Internet Explorer 6.0 Service Pack 1 (SP1).

Earlier versions of the Windows operating system, including Windows 95, Windows 98, Windows Me, Windows NT 3.51 and Windows NT 4.0 are no longer supported by Microsoft. Using SocketTools on an unsupported platform may require that the user install additional system components such as the Microsoft Layer for Unicode and the latest available version of Internet Explorer.

Component Redistribution

For those applications created using the SocketTools scripting components, the component must be distributed along with the application and the component must be registered by the installation program. The process of registration means that specific entries must be created in the system registry which provide information about the component such as the location of the DLL file. Fortunately, COM components are self-registering, which means that the component has the ability to create or update those registry entries itself.

To take advantage of this, the installation program must be capable of loading the control and calling those functions inside the component which update the registry. Most modern installation tools are capable of registering COM components. For in-house setup programs, refer to the technical article on ActiveX Control Registration on the Microsoft Developers Network CD.

It is possible to register COM components manually without the use of an installation program. This may be desirable in those situations where an application is being deployed internally or the developer does not want to create a setup program for a limited distribution. The tool used to manually register an COM component is named RegSvr32 and can be obtained from a number of places including the Visual Basic or Visual C++ CD-ROM. This utility accepts a command line argument which specifies the name of the control to register. For example, the following would register the FTP scripting component:

C:>regsvr32 c:\windows\system32\csftpcm6.dll

A message box would be displayed indicating that the component was registered successfully. To prevent the message box from being displayed, use the /S option which tells the utility to function silently. If an error is reported, typically the reason is that a required system DLL is missing or out of date.

User Account Control Warning COM registration requires account elevation under Windows Vista and Windows Server 2008 because it modifies the system registry. To register components from the command prompt, you must run it with administrative privileges. From the Start menu, select All Programs > Accessories and right-click on the Command Prompt item. Select "Run as Administrator" from the context menu that is displayed.

Version Information

The SocketTools components have embedded information which provides version information to an installation utility. This information, called the version resource, specifies the component's version number among other things. If you are using a third-party or in-house installation program, it is extremely important that the program knows how to use this information.

For example, if you are deploying an application which uses the component, the setup program must determine if it has already been installed on the target system. If it has, it must compare the version resource information in the two files. It should only overwrite the component DLL file if the version that you have included with your application is later than the one installed on the system. An installation program which overwrites the file without checking the version number may cause other programs to fail unexpectedly on the end-user's system, which is obviously not desirable.

Installation Directory

The SocketTools COM libraries should typically be installed in the \Windows\System32 directory on the local machine. Some developers may prefer to install the components along with their application in a private directory. It is not recommended that developers take this approach unless COM redirection or registration-free activation is used because the full pathname of the component file is stored in the system registry when it's registered. If multiple applications install the same COM library in different directories, the actual library that will be used is the one that was last registered. This means that it is possible that an application will load an earlier version of the component than it was built with, which may result in unexpected or fatal errors.

COM redirection enables an application to isolate the components that it uses, ensuring that the same version of the component which was used to build the application is loaded when the program is executed. To activate COM redirection, create an empty file named after the executable with a .local extension. For example, if the program is named MyProgram.exe then an empty file named MyProgram.exe.local should be created in the same directory as MyApp.exe. This binds the application to the local version of any components which are installed in the same directory as the application. When an instance of the component is created, Windows will first search the application's directory, and then uses the standard search rules for locating the file. Note that COM redirection is not supported on Windows 98 earlier versions of Windows.


Copyright © 2008 Catalyst Development Corporation. All rights reserved.