Chapter 20 Creating ActiveX Clients
To generate .tlb and .reg files from components in a package on a remote Jaguar server, connect Jaguar Manager to the remote Jaguar server (on a Windows NT or Solaris machine). Jaguar Manager must be running on Windows NT.
Type libraries contain proxy interface metadata, which can be used to perform drag-and-drop development of the ActiveX client. Also, the APAS uses a type library to perform type checking prior to invoking methods at runtime.
Registry files contain entries for proxy objects so that they can be instantiated using the standard mechanisms in ActiveX-enabled IDEs for creating an OLE automation object. These registry entries also specify the location of the APAS, which is responsible for processing all operations invoked by an ActiveX client on the proxy object. When generating type libraries and registry files for a package, Jaguar Manager can automatically register the type libraries in the local registry.
An ActiveX client can be deployed on many machines. If you deploy an ActiveX client on another machine, make sure that the .tlb and .reg files also deployed on that machine. Because the location of these files and the APAS might be different from their location on the original machine, you must use the jagreg tool to automatically update and register the .reg files. (See "Deploy the ActiveX client" for details on jagreg.)
You must have the Microsoft uuidgen.exe (which is provided with Jaguar) and midl.exe tools to generate type libraries and registry import files for an ActiveX proxy. Make sure that the directory or directories containing these tools are in your path before you run Jaguar Manager. See "ActiveX client requirements" for more information about how to get midl.exe.
A type library cannot be updated while in use Jaguar Manager will fail to generate .tlb/.reg information if you attempt to overwrite a type library file that is in use. Exit or shut down any ActiveX client applications that use the type library before you attempt to generate an updated version. Alternatively, generate the type library to a different directory than the one that is in use, and reregister the library in the new location.
If you do not want to use the default PROGID, then you can
specify your own PROGID by setting com.sybase.jaguar.interface.com.progid
property
in the All Properties tab for the interface before generating .tlb and .reg files.
The default PROGID for the proxy object follows this pattern:
module1_module2_module3.innerModule.Each nested module name is preceded by an underscore, and the IDL type name is preceded by a period (.). For example, the PROGID for IDL type com::sybase::foo::MyBeanRemote is "com_sybase_foo.MyBeanRemote", and the PROGID for the IDL type CtsSecurity::SSLSessionInfo is "CtsSecurity.SSLSessionInfo".
If a component implements multiple interfaces, you must change the PROGID for each interface individually.
To generate .tlb and .reg files:
WARNING! | Do not leave this field blank. If you do, an empty string will be inserted into the InProcServer32 entry in the NT Registry and the ActiveX proxy will not run. |
The directory containing jagproxy.dll does not need to be in the path. The directory containing Jaguar's C++ client DLLs does need to be in the path.
If unsupported constructs or datatypes are present in your file, they are ignored. The generation succeeds and a dialog is displayed. The constructs or datatypes that were not generated to the .tlb/.reg files are displayed in srv.log in the Jaguar installation bin directory. For more information about unsupported constructs and datatypes, see Chapter 19, "Creating ActiveX Components".
Clicking Generate creates the files PACK.TLB, PACK.REG, and PACK.IDL (if Save MIDL File is checked), where PACK is the name of the selected package. Every component in the package is processed and its information stored in these files.
Copyright © 2000 Sybase, Inc. All rights reserved. |