|
IDL Connectivity Bridges: Exporting IDL Objects |
|
This section describes how to configure build machines:
and client machines:
As a developer of applications that use wrapped IDL objects, you should be familiar with all of the information in this section.
The computer that runs the Export Bridge Assistant must meet the following requirements:
|
Item
|
Description
|
|---|---|
|
General Requirements
|
|
|
COM Requirements
|
Visual Studio must be installed.
|
|
Java Requirements
|
Java must be installed, and
javac must be in the execution path.
|
| Note See Supported Platforms and IDL Modes for supported COM and Java versions. |
If different from the machine running the Assistant, the machine using wrapper objects in application development must meet the following requirements in addition to the requirements listed for the Assistant (Configuring the Machine Running the Assistant).
The wrapper object generated by the Assistant must be registered using regsvr32 <wrapperName>.DLL for non-drawable objects or regsvr32 <wrapperName>.OCX for drawable objects. To register a file:
A message box will report the successful registration of the file.
| Note If needed, you can unregister a file by using the -u flag as in regsvr32 -u <wrapperName>.DLL |
See Wrapper Generation Example for a short example that exports and uses a simple IDL object.
Java must be installed. Both javac and java must be in the execution path.
| Note The Java runtime environment installation does not provide javac. |
For compilation and execution, the file IDL_DIR/resource/bridges/export/java/javaidlb.jar must be in the Java classpath.
For Java routines to use the exported java objects, they must use the following import statement:
import com.idl.javaidl.*
On UNIX systems, the LD_LIBRARY_PATH environment variable (DYLD_LIBRARY_PATH on Mac OS X) must include the IDL bin.<platform>.<arch> directory. The PATH environment variable must also include this directory.
The IDL_PATH environment variable must include the directory containing the IDL source object source or SAVE file. In most cases, the variable should also include the default IDL library so that IDL routines can be resolved.
See Wrapper Generation Example for a short example that exports and uses a simple IDL object.
On UNIX platforms, source the <IDL_DIR>/bin/bridge_setup script to set the appropriate values for the IDL_DIR, LD_LIBRARY_PATH, and CLASSPATH environment variables. (The <IDL_DIR>/bin directory also contains versions of this script for use with the korn or bash shells.)
| Note On 64-bit Solaris platforms, the bridge_setup script will specify the 32-bit version of IDL by default, since most Solaris systems use the 32-bit version of Java as the default. To explicitly specify that the 64-bit version of IDL should be used, set the IDL_PREFER_64 environment variable. (The value to which this environment variable is set is not important; if it is defined at all the 64-bit version of IDL will be used.) |
There is no bridge_setup script for Windows platforms. In most cases, setting the CLASSPATH environment variable (or specifying the class path along with the java or javac command at the command line) is the only configuration necessary.
The machine running the COM or Java application that uses a wrapper object must have either a licensed version of IDL or a copy of the IDL Virtual Machine installed. (Note that applications that use the ExecuteString method will not work in the IDL Virtual Machine.) Additionally, the IDL .pro or .sav file containing the object definition must be in the IDL path. This requirement also applies to any IDL files called by code in the source object.
For a COM application:
exe), and any .dlls generated during the Visual Studio build process must be made available to the client.
dll or .ocx file associated with a custom wrapper object must be registered on the client machine. The client need not have Visual Studio installed.
| Note Applications using the connector wrapper object need not register the connector object . dll. This file is automatically registered upon IDL installation. |
For a Java application:
class file must be made available to the client
IDL_DIR/resource/bridges/export/java/javaidlb.jar must be in the Java classpath
| Note On UNIX systems, it is advisable to execute the bridge_setup script on the client machine as part of the Java application initialization. This ensures that IDL is properly configured on the client machine. See The bridge_setup Script for details. |
IDL Online Help (March 06, 2007)