3.2.3 Initialization

The client MUST create an RPC connection to the remote computer identified by the CurrentServer (section 3.2.1.7) data element by using the details specified in section 2.1. If the RPC connection to the directory service server referenced by the CurrentServer data element cannot be established, the client MUST retry the initialization with a different server as follows:

  • For each server in the DirectoryServiceServersCollection (section 3.2.1.4) data element except the server identified by the CurrentServer data element, retry the RPC connection. If the connection to a server succeeds, set CurrentServer to that server. If a connection cannot be established to any server, the client MUST fail the initialization and take no further action.

The client MAY<144> call the S_DSGetServerPort method. This method returns an RPC endpoint port number for either the RPC over TCP/IP protocol sequence or the RPC over SPX protocol sequence [MS-RPCE] as specified by the client. The client MUST create an RPC binding handle to the remote computer by using the returned RPC port. All other method calls on the server interface MUST use the resulting binding handle.

Many of the methods of the dscomm interface require a PCONTEXT_HANDLE_SERVER_AUTH_TYPE RPC context handle as an input parameter. The client MUST call S_DSValidateServer to acquire a context handle prior to calling any method that requires this handle as input. The client MUST call S_DSCloseServerHandle when finished with the context handle.