Modifying Visual Basic 6 Applications to Work with Reflection Desktop 16

  • 7024451
  • 26-Feb-2020
  • 18-Mar-2020

Environment

Reflection Desktop (including Pro, for X, for IBM, or for UNIX and OpenVMS) 16.0 or higher

Situation

If you have developed a Visual Basic (VB) application that uses early binding with prior versions of the Reflection or EXTRA! Type Libraries, you may see one of the following errors when attempting to build or run the project with Reflection Desktop 16.x, Reflection 2014 or Reflection 2011:

        Compile error: Can't find project or library

                or

   This is an unsupported session instance.


The VB References dialog may also display one of the following messages (where n.n is a version number):

    Missing: Reflection for IBM n.n Object Library

                or

    Missing: Attachmate EXTRA! n.n Object Library

NOTE:These symptoms do not occur with scripts and applications that access the Reflection or EXTRA! COM object using version-independent late binding CreateObject() calls and do not reference the type library information (such as constant enum names).

Resolution

To enable your VB project to run with Reflection Desktop 16.x, Reflection 2014 or Reflection 2011 (with early binding), make the following changes.

  1. Modify Reflection or EXTRA! namespace references in your code as follows:

    Change Reflection.Session to ReflectionCOM.Session.
           For example:
      ribm = New ReflectionCOM.Session

    Change EXTRA to EXTRACOM.
          For example:
      sys = New EXTRACOM.ExtraSystem

  2. In the project References dialog, use ReflectionCOM or EXTRACOM as appropriate. Be sure to remove the reference to the missing object library.

  3. Re-compile your project code.

Additional Information

For similar errors in Reflection FTP Client, see KB 7022037.

For more information about the legacy Reflection COM API, see KB 7021740.

For more information about the legacy EXTRA COM API, see https://docs.attachmate.com/extra/x-treme/apis/com/.

For additional programming resources, see KB 7022686.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.