Attachmate Worldwide  |   Contact Us  |   NetIQ.com
Home » Support » Solution Library

Technical Notes

Reflection FTP API Errors After Upgrading
Technical Note 1861
Last Reviewed 20-Jun-2008
Applies To
Reflection for IBM 2007
Reflection FTP Client version 15.0
Summary

If you have an application, script, or macro that uses the API included with Reflection FTP Client version 14.0 or earlier, it may need to be updated to run with version 15.0.

Note: Reflection FTP Client version 15.0 is included with products listed in the Applies To section above.

Symptoms

If you have developed a Visual Basic (VB) or .NET C# application to use an earlier version of the Reflection FTP API, you may see errors when attempting to compile or run your application. The error message varies depending on your development environment.

Error when running a C# application:

Retrieving the COM class factory for component with CLSID {21B15F09-4B5F-11D3-A9B6-00C04FA3624C} failed due to the following error: 80040154.

Error when running a Microsoft Visual Basic 6.0 (VB6) application:

ActiveX component can't create object

Error when building a VB6 project:

Compile error: Can't find project or library

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

Solution

To enable your project to run with Reflection FTP Client version 15.0 or higher, make the following changes:

  1. If you are working with a .NET project, remove the existing reference to ReflectionFTP.
  2. In your .NET, VBA, or VB6 project, add a reference to the Reflection FTP 1.15 Type Library.
  3. Modify your code to use ReflectionFTP15 instead of ReflectionFTP3 as shown in the code examples below.
  4. Re-compile your project code.

Code Examples

The following sample code demonstrates using early binding in Visual Basic for Applications (VBA):

Sub Main()
    ' Early binding - using Reflection FTP 1.15 Type Library
    Dim FTP As New ReflectionFTP15
    With FTP
        .Open "host", "username", "password", "", 21, True
        ...
    End With
    Set FTP = Nothing
End Sub

The following sample demonstrates .NET C# code in Microsoft Visual Studio 2005:

using System.Text;
using ReflectionFTP;
namespace ConsoleFTP115Test
{
    class Program
    {
        static void Main(string[] args)
        {
            // Using Reflection FTP 1.15 Type Library
            ReflectionFTP15 FTP = new ReflectionFTP15();
            FTP.Open("host", "username", "password", "", 21, -1);
            ...
        }
    }
}

For complete Reflection FTP API help documentation, see Technical Note 2362.

Related Technical Notes
1176 Reflection FTP Client Technical Notes
2183 Developer Tools for Attachmate Products
2209 Compile Error "Can't Find Project or Library" With Reflection 2007
2362 Programming with Reflection FTP Client and COM

Did this technical note answer your question?

Yes    No    Somewhat     Not sure yet

Additional comments about this tech note:

Need further help? For technical support, please contact Support.