AttachToRemoteMachine Method

This method binds to the LDAP service on the machine specified.

IDL Definition

HRESULT AttachToRemoteMachine([in] VARIANT szMachineName /* VT_BSTR */ ); 

Parameters

bszMachineName

a VT_BSTR variable containing the UNC, DNS name, or IP address of the machine running an instance of the LDAP server to administer.

Return Values

A standard HRESULT value

Remarks

This method is used to prepare configuration of a instance of the LDAP service hosted on a remote machine.  The name passed can be an UNC, a DNS resolvable name, or an IP address in dot (quad) notation.  Always call this method first to administer a remote instance. 

For performance and ease-of-use reasons, the object that implements the Ildapcfg interface is a COM object. This object, in turn, connects to a DCOM object that is part of the LDAP server in order to perform the necessary configuration activities.

By default, the Ildapcfg object connects to the LDAP server on the local machine. Using this method, however, connections can be established to an LDAP server on some other machine. This allows the use of the Ildapcfg methods and properties in the administration of that remote server.

The AttachToRemoteMachine must be called before any attempt to configure a remote LDAP server. The effects of thismethod last until the next call to AttachToRemoteMachine, or a call to AttachToLocalMachine.

Example

Set LdapConf = CreateObject("MemAdmin.LDAPConfig.1")
BrokServers.AttachToRemoteMachine "SomeServer"

© 1997-1998 Microsoft Corporation. All rights reserved.