PRB: Error When You Create a COMAdminCatalog Object on Windows 2000 (312599)



The information in this article applies to:

  • Microsoft COM+ 1.0, when used with:
    • the operating system: Microsoft Windows XP
  • Microsoft COM+ 1.5, when used with:
    • the operating system: Microsoft Windows XP

This article was previously published under Q312599

SYMPTOMS

When you bind to the COM+ 1.0 Admin Type Library on a computer that is running Microsoft Windows XP and you use early binding to create a COMAdminCatalog object, you may receive the following error message when you run the code on the computer that is running Microsoft Windows 2000.sage:
Runtime error 430:
Class does not support Automation or does not support expected interface.

CAUSE

This behavior can occur because the default interface for the COMAdminCatalog object was changed from ICOMAdminCatalog to ICOMAdminCatalog2 in Windows XP, and the early-bound client binds to the ICOMAdminCatalog2 interface. The ICOMAdminCatalog2 interface is not available on Windows 2000 and causes the error message referenced in the "Symptoms" section of this article.

RESOLUTION

To resolve this behavior, use late binding so that the default interface is used and the code runs on either platform.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce the Behavior

On the computer that is running Windows XP:
  1. Create a new standard Microsoft Visual Basic .EXE project.
  2. Add a project reference to the COM+ 1.0 Admin Type Library.
  3. Add the following code to the Form Load event:
    Dim oCatalog as COMAdminCatalog
    Set oCatalog = New COMAdminCatalog
    MsgBox "Object Created"
    Set oCatalog = Nothing
    					
When compiled, the previous code executes on the computer that is running Windows XP, but does not work on the computer that is running Windows 2000.

Modification Type:MajorLast Reviewed:2/8/2002
Keywords:kberrmsg kbprb KB312599