To create a Visual Basic .NET console application using the connector object wrapper methods to print “Hello World” in a console application window, complete the following steps:

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

Note: The text file for this example, com_export_hello_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, a simple console window will appear and “Hello World” will be output to this location.

 

Note: An expanded “Hello World” example that allows you to optionally say hello from someone can be found in Hello World COM Example with Custom Method. This example uses a custom IDL object with a method and the Export Bridge Assistant to create the necessary wrapper object files.