Bridges > COM Export Bridge > Examples > About COM Export Object Examples

# About COM Export Object Examples

An IDL object can be wrapped for use in a COM application using the Export Bridge Assistant as described in Using the Export Bridge Assistant. This chapter provides several Visual Basic .NET examples that use custom COM export objects. These include:

- Nondrawable examples show how to access the processing power of IDL in a COM application by exchanging data with the IDL process, issuing IDL commands, and accessing IDL output. See Nondrawable COM Export Example.
- Drawable examples contain the elements needed to create interactive IDL drawing windows and to access keyboard and mouse events. See Drawable COM Export Example.

Note: You can quickly incorporate the processing power of IDL in a COM application by including the pre-built COM connector wrapper object in your external application. Use this option if you do not need custom methods or an interactive drawing surface. See Using the Connector Object for examples.

The general process for each of these examples involves the following:

1. Create the object in IDL.
2. Export the object using the Export Bridge Assistant, which creates the .dll, .tlb or .ocx files associated with the IDL object that is now wrapped in a COM export object wrapper.
3. Register the .dll or .ocx file.
4. Reference the appropriate library in your COM application before attempting to access the object functionality. This functionality automatically includes stock methods and events (described in Using Exported COM Objects) in addition to custom methods you have chosen to export.

See Writing IDL Objects for Exporting for information on how to create custom IDL objects that can be successfully exported using the Export Bridge Assistant. There are important object method and data type requirements that must be met.

When you distribute an application, you will also need to share:

- any application-specific .dll files generated during the build process
- the executable file (.exe)
- the .dll or .ocx files (generated by the Export Bridge Assistant)
- the .pro or .sav file that contains the custom object definition

Any .pro or .sav files included with your application must be located in the IDL path.

## Debugging Applications Using Export Objects

It can be challenging to determine what is happening in the IDL process associated with a wrapper object without the debugging features of the IDL Workbench. For access to valuable debug information, consider using the IDL_BRIDGE_DEBUG environment variable, described in Debugging COM Wrapper Objects.