NWLoginToFileServer

Attempts to log an object in to the specified NetWare server.

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:Server Environment

Syntax

  #include <nwserver.h> 
  #include <nwbindry.h> 
  or 
  #include <nwcalls.h> 
   
  NWCCODE N_API NWLoginToFileServer  ( 
     NWCONN_HANDLE        conn,  
     const nstr8 N_FAR   *objName,  
     nuint16              objType,  
     const nstr8 N_FAR   *password);
  

Delphi Syntax

  uses calwin32 
   
  Function NWLoginToFileServer 
    (conn : NWCONN_HANDLE; 
     const objName : pnstr8; 
     objType : nuint16; 
     const password : pnstr8 
  ) : NWCCODE;
  

Parameters

conn
(IN) Specifies the NetWare server connection handle.
objName
(IN) Points to the bindery object name of the object logging in to the NetWare server object name (up to 48 characters including the NULL terminator).
objType
(IN) Specifies the Bindery object type of the object logging in to the NetWare server.
password
(IN) Points to the upper-case password of the bindery object logging in to the NetWare server (or pass in a zero-length string if a password is not required).

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

SUCCESSFUL

0x8800

ALREADY_ATTACHED

0x8801

INVALID_CONNECTION

0x890A

NLM_INVALID_CONNECTION

0x8996

SERVER_OUT_OF_MEMORY

0x89C1

LOGIN_DENIED_NO_ACCOUNT_BALANCE

0x89C2

LOGIN_DENIED_NO_CREDIT

0x89C5

INTRUDER_DETECTION_LOCK

0x89D9

ERR_MAX_SERVERS

0x89DA

UNAUTHORIZED_LOGIN_TIME

0x89DB

UNAUTHORIZED_LOGIN_STATION

0x89DC

ACCOUNT_DISABLED

0x89DE

PASSWORD_HAS_EXPIRED_NO_GRACE

0x89DF

PASSWORD_EXPIRED

0x89FB

INVALID_PARAMETERS

0x89FE

BINDERY_LOCKED

0x89FF

NO_SUCH_OBJECT_OR_BAD_PASSWORD

0xFF

Failure

Remarks

If the conn parameter specifies an NDS authenticated connection, NWLoginToFileServer will return ALREADY_ATTACHED (0x8800).

To determine if the conn parameter specifies an NDS authenticated connection, call NWCCGetConnRefInfo with the infoType parameter set to NWCC_INFO_NDS_STATE. If NWCC_NDS_CAPABLE is returned in the infoType parameter, the connection must be cleared (see Closing and Clearing Connections) and a new connection must be opened (see Attaching to Servers and Opening Connections) before NWLoginToFileServer will successfully return (NDK: Connection, Message, and NCP Extensions).

If the encryption key is not available, it attempts an unencrypted login. If the key is available, the password is encrypted and an encrypted login is attempted.

NWLoginToFileServer performs only the login, not the attach. Clients must be previously attached to call NWLoginToFileServer. Attaching to a NetWare server is not the same as logging in. A workstation attaches to a NetWare server to obtain a connection number. The workstation can then log in to the NetWare server using that connection number. NWLoginToFileServer does not, however, interpret the login script.

Valid bindery object types for OT_ constants follow:

  OT_WILD                   0xFFFF 
  OT_UNKNOWN                0x0000 
  OT_USER                   0x0100 
  OT_USER_GROUP             0x0200 
  OT_PRINT_QUEUE            0x0300 
  OT_FILE_SERVER            0x0400 
  OT_JOB_SERVER             0x0500 
  OT_GATEWAY                0x0600 
  OT_PRINT_SERVER           0x0700 
  OT_ARCHIVE_QUEUE          0x0800 
  OT_ARCHIVE_SERVER         0x0900 
  OT_JOB_QUEUE              0x0A00 
  OT_ADMINISTRATION         0x0B00 
  OT_NAS_SNA_GATEWAY        0x2100 
  OT_REMOTE_BRIDGE_SERVER   0x2600 
  OT_TCPIP_GATEWAY          0x2700 
  
  

Extended bindery object types follow:

  OT_TIME_SYNCHRONIZATION_SERVER   0x2D00 
  OT_ARCHIVE_SERVER_DYNAMIC_SAP    0x2E00 
  OT_ADVERTISING_PRINT_SERVER      0x4700 
  OT_PRINT_QUEUE_USER              0x5300 
  
  

NCP Calls