An ActiveX component or ASP component is a DLL or OCX file containing one or more classes which can be called from a programming language that supports ActiveX. Before the programme can call the component, it must be "registered" on the computer or server that is running the programme.
There is a command line utility called REGSVR32.EXE that is provided by Microsoft for registering components. It can be found in the Windows System directory and it can be run from the command prompt or from the Run option in the Start Menu. (Note that from Windows Vista and Windows 2008 Server onwards the Command Prompt must be run as an administrator otherwise running REGSVR32 will produce an error.)
The syntax is:
The path to the DLL is required and this can be difficult to type at the command prompt, so we provide a free utility that can be used to register DLL and OCX files using a Windows interface for selecting the file.
There are two executable files supplied in the download. The 32 bit version, DllRegSvr.exe, and the 64 bit version, DllRegSvr64.exe. It is not possible to register a 32 bit component with the 64 bit version and vice versa.
To use this utility, unzip the file and run the appropriate executable. In from Windows Vista onwards you must run as the administrator, which is done by right clicking on the executable or the shortcut.
Click the "Browse" and navigate to, and select, the DLL or OCX file that you wish to register. Then click the Register button. Files can also be unregistered by using the other button.
In the case of ASP components which are used by IIS, you must make sure that the Internet Guest User has read and execute permission on the DLL file, or the directory containing the DLLs, otherwise an ASP 0178 error will result. On Windows 2008 Server the Internet Guest User account is IUSR and on earlier systems it is IUSR_Machine_Name.
It is not usually necessary to reboot the computer after registration, but occasionally this is required. If you register an ASP component and receive an ASP 0177 error, check that you have typed the class name correctly in the script and if it is correct and you still get the error, try rebooting the machine.
In 32 bit Windows many applications installed their component files into the Windows\System32 folder. After the introduction of 64 bit Windows, this folder was reserved for 64 bit files only and 32 bit component files were to be put in the Windows\SysWOW64 folder. This is not what would be expected from the names but it is a result of the way in which the 32 bit emulator maps system files. Do not put 32 bit files in System32 or 64 bit files in SysWOW64. We recommend creating a separate folder for component files because this makes it easier to keep track of what has been installed.
If a 32 bit ASP component is to be used on a 64 bit system it is necessary to either run the web site in 32 bit mode or add the component to a COM+ Application in Component Services. Most Chestysoft components are 32 bit but we have recently launched 64 bit versions of csASPUpload and csImageFile.
A COM component can be called in ASP.NET once it is registered. For best results, create an Interop Assembly using the TLBIMP.EXE tool. Please note that in .NET it is still the component file that must be registered, not the Interop Assembly file.
© Chestysoft, 2014.