BUG: COM+ 1.0 AdminCatalog Always Returns "My Computer"

ID: Q247752


The information in this article applies to:
  • Microsoft Windows 2000
  • Microsoft Visual Studio 6.0


SYMPTOMS

When using the LocalComputer collection of the COM+ Administration objects, all attributes will have the values corresponding to the computer specified in the Connect method of the COMAdminCatalog object, except for the Name property. This will always return the string "My Computer".


RESOLUTION

Currently there is no workaround. If you need the computer name, you need to rely on the string you pass to the .Connect method of the COMAdminCatalog object rather than using the value returned by the Name of the LocalComputer collection.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a Visual Basic EXE project. Place a button in Form1.


  2. Add a reference to "COM + 1.0 Admin Type Library".


  3. Put the following code in the Command1_Click event:


  4. 
        Dim oCat As New COMAdminCatalog
        Dim oCLocalComputerCol As COMAdminCatalogCollection
        Dim oCLocalComputerItem As COMAdminCatalogObject    
    
        oCat.Connect "Win2KServer" 'Replace with any Windows 2000 computer name 
        Set oCLocalComputerCol = oCat.GetCollection("LocalComputer")
        oCLocalComputerCol.Populate
        Set oCLocalComputerItem = oCLocalComputerCol.Item(0)
        MsgBox oCLocalComputerItem.Value("Name")
            
        Set oCLocalComputerItem = Nothing
        Set oCLocalComputerCol = Nothing
        Set oCat = Nothing 
  5. Run the project. No matter what computer you connect to, you will always get "My Computer" in the message box. Please remember to connect to Windows 2000 computers while testing.



REFERENCES

See the MSDN documentation for more detailed information on the LocalComputer collection.

Additional query words: My Computer MTS COM+ Administration LocalComputer same COM + 1.0 Admin

Keywords : kbCOMPlus kbWinOS2000 kbVS600 kbDSupport kbCOMPlusCatalog kbCOMPlusAdmin
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: January 13, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.