The following example creates a simple Windows application in Visual Basic .NET that includes two text boxes. An IDL command typed in the top textbox is passed to the IDL process through using the ExecuteString method. Command output and any error messages are printed in the bottom textbox.

To replicate this example, complete the following steps:

  1. Create a new Visual Basic .NET Windows application and add a reference to the COM_IDL_connectLib 1.0 Type Library.
  2. Replace the default form definition with the code referenced below. See code comments for details.

Note: The text file for this example, com_export_commandline_doc.txt, is located in the examples/doc/bridges/COM subdirectory of the IDL distribution. This Visual Basic .NET code can be copied from the text file and adopted for use in your COM environment.

After building and running the project, enter IDL commands in the top textbox. Pressing the Enter key sends the command to the IDL process.