0 out of 2 rated this helpful - Rate this topic

LocalComputer collection

Applies to: desktop apps only

Contains a single object that corresponds to the computer whose catalog you are accessing. This object holds computer level settings information. If you call the Connect method on an object created from the COMAdminCatalog class, the object in the LocalComputer collection contains information about the remote computer whose catalog you are accessing.

This collection does not support the Add and Remove methods of the COMAdminCatalogCollection object.

Members

The LocalComputer collection inherits from the IUnknown interface but does not have additional members.

Related Collections

You can navigate from this collection to any of the following collections:

You can navigate to this collection from the following collections:

Properties

The following properties are supported by the COMAdminCatalogObject object within the collection:

ApplicationProxyRSN

DescriptionRemote server name used by application proxies by default.
AccessReadWrite
TypeString
Default""
Minimum systemWindows 2000

 

CISEnabled

DescriptionIndicates whether COM Internet Services is enabled.
AccessReadWrite
TypeBool
DefaultFalse
Minimum systemWindows 2000

 

DCOMEnabled

DescriptionSet to True to enable DCOM on the computer.
AccessReadWrite
TypeBool
DefaultTrue
Minimum systemWindows 2000

 

DefaultAuthenticationLevel

DescriptionAuthentication level used by applications that have Authentication set to Default. Values correspond to the Remote Procedure Call (RPC) authentication settings.
AccessReadWrite
TypeLongPossible values:COMAdminAuthenticationDefault (0)COMAdminAuthenticationNone (1) COMAdminAuthenticationConnect (2)COMAdminAuthenticationCall (3)COMAdminAuthenticationPacket (4)COMAdminAuthenticationIntegrity (5)COMAdminAuthenticationPrivacy (6)
DefaultCOMAdminAuthenticationConnect (2)
Minimum systemWindows 2000

 

Note  COMAdminAuthenticationDefault is mapped to COMAdminAuthenticationConnect when COM calls CoInitializeSecurity. It is recommended that you use the constants in the enumeration and not the numeric values.

DefaultImpersonationLevel

DescriptionImpersonation level to allow if one is not set.
AccessReadWrite
TypeLongPossible values:COMAdminImpersonationAnonymous (1)COMAdminImpersonationIdentify (2)COMAdminImpersonationImpersonate (3)COMAdminImpersonationDelegate (4)
DefaultCOMAdminImpersonationIdentify (2)
Minimum systemWindows 2000

 

Note  It is recommended that you use the constants in the enumeration, and not the numeric values.

DefaultToInternetPorts

DescriptionDetermines whether the default type of port provided should be Internet (True) or intranet (False).
AccessReadWrite
TypeBool
DefaultFalse
Minimum systemWindows 2000

 

Description

DescriptionA description of the computer.
AccessReadWrite
TypeString
Default""
Minimum systemWindows 2000

 

DSPartitionLookupEnabled

DescriptionIndicates whether the user of the partition mappings is checked into the domain store.
AccessReadWrite
TypeBool
DefaultTrue
Minimum systemWindows Server 2003

 

InternetPortsListed

DescriptionDetermines whether the ports listed in the Ports property are to be used for Internet (True) or for intranet (False).
AccessReadWrite
TypeBool
DefaultFalse
Minimum systemWindows 2000

 

IsRouter

DescriptionSet to True if the computer is a router for the component load balancing (CLB) service. This property can be set to True only if the component load balancing service is currently installed on the computer; otherwise, it errors with COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM.
AccessReadWrite
TypeBool
DefaultFalse
Minimum systemWindows 2000

 

If this property is set to True, the CLB server is configured and starts at startup. The server is added to the ApplicationCluster collection if it is not already present.

LoadBalancingCLSID

DescriptionThe CLSID of the object to balance.
AccessReadWrite
TypeString
DefaultNULL
Minimum systemWindows XP

 

LocalPartitionLookupEnabled

DescriptionIndicates whether the user of the partition mappings is checked into the local store.
AccessReadWrite
TypeBool
DefaultTrue
Minimum systemWindows Server 2003

 

Name

DescriptionThe name of the computer. Extra spaces at the beginning and end of the string are stripped out. This property is returned when the Key or Name property method is called on an object of this collection.
AccessWriteOnce
TypeString
Default"My Computer"
Minimum systemWindows 2000

 

OperatingSystem

DescriptionThe operating system installed on the local computer.
AccessReadWrite
TypeLongPossible values:COMAdminOSNotInitialized (0)COMAdminOSWindows3_1(1)COMAdminOSWindows9x (2)COMAdminOSWindows2000 (3)COMAdminOSWindows2000AdvancedServer (4)COMAdminOSWindows2000Unknown (5)COMAdminOSUnknown (6)COMAdminOSWindowsXPPersonal (11)COMAdminOSWindowsXPProfessional (12)COMAdminOSWindowsNETStandardServer (13)COMAdminOSWindowsNETEnterpriseServer (14)COMAdminOSWindowsNETDatacenterServer (15)COMAdminOSWindowsNETWebServer (16)
DefaultCOMAdminOSNotInitialized (0)
Minimum systemWindows 2000

 

PartitionsEnabled

DescriptionIndicates whether COM+ partitions can be used on the local computer. If this property is False, any attempt to use COM+ partitions results in an error.
AccessReadWrite
TypeBool
DefaultFalse
Minimum systemWindows Server 2003

 

Ports

DescriptionA string describing ports that are for either Internet or intranet use, depending on the InternetPortsListed property; for example, "500-599: 600-800".
AccessReadWrite
TypeString
Default""
Minimum systemWindows 2000

 

ResourcePoolingEnabled

DescriptionEnables use of resource dispensers.
AccessReadWrite
TypeBool
DefaultTrue
Minimum systemWindows 2000

 

RPCProxyEnabled

DescriptionControls whether the RPC IIS proxy is enabled. The RPC IIS proxy is used in conjunction with IIS to forward calls to the RPC mechanism from IIS and is one of the core pieces of COM Internet Services, which is enabled by setting CISEnabled to True. For more information on RPCProxyEnabled, see HTTP RPC Security.
AccessReadWrite
TypeBool
DefaultFalse
Minimum systemWindows 2000

 

SecureReferencesEnabled

DescriptionEnforces in DCOM computers that cross-process calls to IUnknown::AddRef and IUnknown::Release methods are secured.
AccessReadWrite
TypeBool
DefaultFalse
Minimum systemWindows 2000

 

SecurityTrackingEnabled

DescriptionSet to True if security tracking is enabled on objects.
AccessReadWrite
TypeBool
DefaultTrue
Minimum systemWindows 2000

 

SRPActivateAsActivatorChecks

DescriptionDetermines how the software restriction policy (SRP) handles activate-as-activator connections. If set to True, the SRP trust level that is configured for the server object is compared with the SRP trust level of the client object and the higher (more stringent) trust level is used to run the server object. If set to False, the server object runs with the SRP trust level of the client object, regardless of the SRP trust level with which the server is configured.
AccessReadWrite
TypeBool
DefaultTrue
Minimum systemWindows XP

 

SRPRunningObjectChecks

DescriptionDetermines how the software restriction policy (SRP) handles attempted connections to existing processes. If set to False, attempts to connect to running objects are not checked for appropriate SRP trust levels. If set to True, the running object must have an equal or higher (more stringent) SRP trust level than the client object. For example, a client object with an Unrestricted SRP trust level cannot connect to a running object with a Disallowed SRP trust level.
AccessReadWrite
TypeBool
DefaultTrue
Minimum systemWindows XP

 

TransactionTimeout

DescriptionShould be set to a sufficient value in seconds if you are doing numerous operations within a transaction. The default time-out period is 60 seconds, and the maximum time-out period is 3600 seconds (1 hour). Setting this property to 0 disables transaction time-outs. This property can be overridden by individual components by using the ComponentTransactionTimeout property of the Components collection.
AccessReadWrite
TypeLong (0-3600)
Default60
Minimum systemWindows 2000

 

Example

The following Microsoft Visual Basic example demonstrates how to connect to a remote computer and get its SecurityTrackingEnabled property by using the LocalComputer collection of the remote computer. To use this example, add the COM+ Admin Type Library as a reference to your Visual Basic project.

Function RemoteComputerConnect(strComputer As String _
) As Boolean  ' Return False if any errors occur.
    
    RemoteComputerConnect = False   ' Initialize the function.
    On Error GoTo My_Error_Handler  ' Initialize error handling.

    Dim boolSTE As Boolean
    Dim objCatalog As COMAdminCatalog
    Dim objRemoteRootColl As COMAdminCatalogCollection
    Dim objRemoteComputerColl As COMAdminCatalogCollection
    Dim objRemoteComputerItem As COMAdminCatalogObject
    
    Set objCatalog = CreateObject("COMAdmin.COMAdminCatalog")
    Set objRemoteRootColl = objCatalog.Connect(strComputer)
    Set objRemoteComputerColl = objRemoteRootColl.GetCollection( _
      "LocalComputer", objRemoteRootColl.Name)
    objRemoteComputerColl.Populate
    Set objRemoteComputerItem = objRemoteComputerColl.Item(0)
    boolSTE = objRemoteComputerItem.Value("SecurityTrackingEnabled")
    If boolSTE Then
        MsgBox "Security Tracking is enabled on " & strComputer
    Else
        MsgBox "Security Tracking is NOT enabled on " & strComputer
    End If

    Set objRemoteComputerItem = Nothing
    Set objRemoteComputerColl = Nothing
    Set objRemoteRootColl = Nothing
    Set objCatalog = Nothing
    RemoteComputerConnect = True  ' Successful end to procedure
    Exit Function

My_Error_Handler:  ' Replace with specific error handling.
    MsgBox "Error # " & Err.Number & " (Hex: " & Hex(Err.Number) _
      & ")" & vbNewLine & Err.Description
    Set objRemoteComputerItem = Nothing
    Set objRemoteComputerColl = Nothing
    Set objRemoteRootColl = Nothing
    Set objCatalog = Nothing
End Function



To use the function, provide a string value for the name of the remote computer. The following Visual Basic code shows how to connect to the computer named "RemoteComputerName".

Sub Main()
    If Not RemoteComputerConnect("RemoteComputerName") Then
        MsgBox "RemoteComputerConnect failed."
    End If
End Sub


See also

COM+ Administration Collections

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ