# IDL Bridges

Bridge technology allows applications in different programming languages or environments to share information: for example, between IDL and Java. With bridge technology, you can use an application that manipulates data in its native language by calling on objects and processes from IDL.

## Connectivity Bridges Overview

### IDL Import Bridge

The IDL Import Bridge technology lets you use COM and Java objects in IDL applications.

#### COM and ActiveX

You have two options for incorporating a COM object into IDL:

- If the COM object does not have its own interface, you can use the IDLcomIDispatch object class to communicate with the underlying COM object through the COM IDispatch interface (see Using COM Objects in IDL and Skills Required to Use COM Objects for details).
- If the COM object does have its own interface (i.e., it is an ActiveX control), you can use IDL’s WIDGET_ACTIVEX routine to place the control in an IDL widget hierarchy (see Using ActiveX Controls in IDL for details).

#### Java

The IDL-Java bridge lets you access Java objects within IDL code. Java objects imported into IDL behave like normal IDL objects. The bridge also provides IDL with access to exceptions created by the underlying Java object. For more information, see Using Java Objects in IDL.

### IDL Export Bridge

The IDL Export Bridge technology lets you use IDL objects in COM and Java applications. For a general overview of this technology, see Exporting IDL Objects.

Note: The Export Bridge technology is installed as part of IDL. For requirements, see Running the Assistant.

With the Export Bridge, interaction with IDL is through native Java and COM wrapper objects that are generated for each IDL object with which client applications want to interact. The wrapper objects manage all aspects of IDL loading, initialization, process management, and cleanup, so users need only be familiar with the client language (for embedding the wrapper in the client application) and the basics of IDL (for accessing and manipulating IDL data and processes).

#### Export Bridge Assistant

The key to creating your own exported IDL objects is the Export Bridge Assistant, which generates these native wrapper objects from IDL objects. The Assistant is an interactive dialogue in IDL that lets you customize the wrapper object you want to create from the underlying IDL object. You can select the methods, parameters, and properties that you want to export, as well as other information about the IDL object (e.g., whether to convert array majority for parameters). See Using the Export Bridge Assistant for details.

#### Connector Object

Instead of exporting a custom IDL source object using the Assistant, you can also access IDL functionality using the pre-built connector object that is shipped with the IDL distribution. This IDL connector object lets you quickly incorporate the processing power of IDL into an application developed in an external, object-oriented environment such as COM or Java. The connector object provides a basic, non-drawable wrapper that includes the ability to get and set IDL variables and execute command statements in the IDL process associated with the connector object. For more information, see Using the Connector Object.

## Importing From IDL

### ActiveX Controls

- About Using ActiveX Controls in IDL

- ActiveX Control Naming Scheme

- ActiveX Widget Events

- Calendar Control Example

- Creating ActiveX Controls

- Destroying ActiveX Controls

- Managing ActiveX Control Properties

- Method Calls on ActiveX Controls

- Spreadsheet Control Example

### COM Objects

- About Using COM Objects in IDL

- COM-IDL Data Type Mapping

- Creating IDLcomIDispatch Objects

- Destroying IDLcomIDispatch Objects

- IDLcomIDispatch Object Naming Scheme

- Managing COM Object Properties

- Method Calls on IDLcomIDispatch Objects

- Passing Parameter Arrays by Reference

- References to Other COM Objects

- RSIDemoComponent Example

### Java Objects

- Creating IDL-Java Objects

- Destroying IDL-Java Objects

- IDL-Java Bridge Data Type Mapping

- IDL-Java Bridge Examples

  - Accessing Arrays Example

  - Accessing Grayscale Images Example

  - Accessing RGB Images Example

  - Accessing URLs Example

- Initializing the IDL-Java Bridge

- Java Exceptions

- Managing IDL-Java Object Properties

- Method Calls on IDL-Java Objects

- Overview of Using Java Objects

- Showing IDL-Java Output in IDL

- The IDLJavaBridgeSession Object

- Troubleshooting Your Bridge Session

## Exporting From IDL

### COM Objects

- About COM Export Object Examples

  - COM IDLgrWindow Based Histogram Plot Generator

  - COM IDLitWindow Surface Manipulator

  - Tri-Window COM Export

- COM Wrapper Objects

- Debugging COM Wrapper Objects

- Drawable COM Export Examples

- Error Handling

- Event Handling

- Nondrawable COM Export Example

- Overview of COM Export Objects

- Stock COM Wrapper Methods

### Connector Objects

- About the IDL Connector Object

- Connector Object COM Examples

  - Data Manipulation with a COM Connector Object

  - Hello World Example with a COM Connector Object

  - IDL Command Line with a COM Connector Object

- Connector Object Java Examples

  - Data Manipulation with a Java Connector Object

  - Hello World Example with a Java Connector Object

  - IDL Command Line with a Java Connector Object

- Preparing to Use the IDL Connector Object

- Using the Connector Object

### Export Bridge Assistant

- Building an Object

- Export Bridge Assistant Overview

- Exporting an Object

- Exporting a Source Object’s Superclasses

- Information Skipped During Export

- Modifying a Source Object After Export

- Running the Assistant

- Specifying Information for Exporting

- Using the Assistant

- Working with a Project

- Wrapper Generation Example

### IDL Objects

- Configuring Build and Client Machines

- Drawable Object Canvas Examples

- Event Handling

- Exporting Drawable Objects

- IDL Access

- Object Lifecycle

- Overview of Exporting IDL Objects

- Overview of Writing IDL Objects for Exporting

- Parameter Passing and Type Conversion

- Programming Limitations

- Supported Platforms and IDL Modes

- Wrapper Objects

### Java Objects

- About Java Export Object Examples

- Debugging Java Wrapper Objects

- Drawable Java Export Examples

- Java IDLgrWindow Based Histogram Plot Generator

- Java IDLitWindow Surface Manipulation

- Error Handling

- Event Handling

- Java Wrapper Objects

- Nondrawable Java Export Example

- Overview of Java Export Objects

- Stock Java Wrapper Methods

## Appendices

### IDL Java Object API

- Package Summary

### COM Object Creation

- C++ Client Code Sample

- C# Code Sample

- COM Object Creation

- Sample IDL Object

- Visual Basic 6 Code Sample

- Visual Basic .NET Code Sample

### Java Object Creation

- Java Object Initiation with Parameters

- Java Object Initiation without Parameters

- Sample IDL Object

### Multidimensional Array Storage and Access

- 2D Array Examples

- Overview

- Storage and Access in COM and IDL

- Why Storage and Access Matter