Accessing ActiveX Controls (OCXs) using J-Integra®'s ocxhost tool

J-Integra® now supports embedding ActiveX Controls in Java frames, and the ocxhost tool is no longer needed for this purpose. However, the information below will be kept in the documentation for future reference, as some people may still be using the ocxhost tool in their applications.

An ActiveX Control is a kind of COM component that generally requires hosting in a GUI container. ActiveX Controls typically have the extension '.ocx'. Most COM components can be directly accessed from Java using the proxies generated by 'com2java' - you only need to use the ocxhost tool when talking to OCXs.

J-Integra® includes a thin ActiveX Control Container called 'ocxhost' which can be used to faciliate access to ActiveX Controls. It can be found in the J-Integra® 'bin' directory.

Prior to using it, run 'ocxhost.exe' once in order to allow itself to register on your machine. You may also use ocxhost.exe /multipleuse to register the container for multiple use which means an existing instance of ocxhost will be reused by multiple clients.

The documentation on the com.linar.ocxhost.Container class includes two examples.

It is important to understand that when using ocxhost, the ActiveX Control runs in a separate process from the Java Virtual Machine that is making use of it. Indeed they could actually be on totally separate machines.