What is the procedure for distributing OCX's?


An OCX must be registered with the Windows registry before it can be used. Registration will happen automatically on the development machine when you install your DBI product. When you distribute an OCX with your application, you must make sure that the install program you use to deploy the application is capable of registering components. The Windows registry is a database of objects that are available to OLE enabled applications. If an OCX component is not registered, the host application will not know where to look for it and its functionality. External programs such a REGSVR32.EXE can also be used to register or remove controls in the Windows registry. To register an OCX directly from the DOS prompt, type the following: REGSVR32 <filename>.OCX. When distributing an application containing OCX components, you must also make sure the client machine (the machine onto which you are deploying the application) contains the Microsoft OLE support files (listed below).

MFC42.DLL (version 6.0 or later) -- this is the Microsoft Foundation Class Library. It must be registered with your system 
registry. If these are not available on the client's machine, then you should include them with your install. You can 
download the latest MFC by navigating to the following location: http://activex.microsoft.com\controls\vc\mfc42.cab 

MSVCRT.DLL -- this is the Microsoft C Runtime Library. It does not need to be registered, but must be present in your 
..Windows\System directory. 

MSSTKPRP.DLL -- this is required to display the stock property pages of the components in development mode. 

MSHTML.DLL and MLANG.DLL -- these are Microsoft dll's required for the operation of the ctHTML View component. These dll's 
are present on all Windows '98 and 2000 OS's, however NT 4.0 requires at least a minimum install of IE 4.0 to upgrade the OS 
with these dll's. These files must be distributed (and registered where necessary) with your applications (with the exception 
of MSSTKPRP.DLL). You may require additional OCX or OLE support files if your application requires them. Check with the host 
language manual to determine what those files (if any) might be. In order to use the OCX components in the development environment you will need license files for each installed component (<ClassName>.LIC). The license files must be placed in the same directory as the OCX files on your development machine. (Note: the license files are not required on client machines. NEVER distribute the license files to customers. These would allow the OCX files to be used for development at potentially non-licensed sites.)