SetCurrentFileServerID

Sets the current connection ID (server ID)

Local Servers:N/A
Remote Servers:blocking
Classification:3.x, 4.x, 5.x, 6.x
Service:Connection Number and Task Management

Syntax

  #include <nwcntask.h>  
   
  WORD SetCurrentFileServerID  (  
     WORD   fileServerID); 
  

Parameters

fileServerID
(IN) Specifies the file server ID to set.

Return Values

This function returns the old file server ID if successful. Otherwise, it returns EFAILURE.

Remarks

If the file server ID is nonzero (remote server), a login operation must have previously been performed on that server or SetCurrentFileServerID returns an error.

After calling SetCurrentFileServerID, call SetCurrentConnection to set the correct connection.

When changing to a remote server, the current connection is set to the first connection number in the connection list for that server. SetCurrentConnection can then be used to specify some other connection.

When changing to a local server (zero), the current connection is set to the first connection number in the local connection list. If no local logins have been performed, the current connection is set to zero.

See Also

GetCurrentFileServerID