Microsoft KB Archive/247752

From BetaArchive Wiki

Article ID: 247752

Article Last Modified on 7/31/2001



APPLIES TO

  • Microsoft COM+ 1.0



This article was previously published under Q247752

SYMPTOMS

When you use 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 must 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 that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Standard EXE project in Visual Basic.
  2. Add a reference to "COM + 1.0 Admin Type Library".
  3. Place a CommandButton control on Form1.
  4. Paste the following code in the Command1_Click event:

        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

For more information about the LocalComputer collection, see the following MSDN Web site:


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

Keywords: kbbug kbnofix kbsysadmin kbcompluscatalog KB247752