Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_login( <cobject>, <ntype> [, <cpassword> [, <cserver> ] ] ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_LOGIN( <cObject>, <nType> [, <cPassword> [, <cServer> ] ] )


Parameters

<cObject>
Name of the object to attach.

<nType>
Type of the object.

<cPassword>
Password (optional).

<cServer>
Name of a server.


Returns

Logical true if successful, false otherwise. If the function returns 
false, you can call N_ERROR(), which will return the NetWare error 
code.


Description

<nType> is a NetWare object-type number.  Commonly used object types 
are listed below.

Value         Object type
1             User
2             Group
3             Print queue
4             File server
6             Gateway
7             Print server
38            Remote bridge

If a server is specified, an attempt will be made to attach and log 
into the specified server. If you specify a server, then you must also 
specify a password, although the password can be blank ("").

N_LOGIN() may fail either because the user could not log in, or because 
the station could not attach to the specified server. This might be 
caused by something as simple as the station already being attached to 
eight servers (the NetWare maximum). In that case, you would need to 
log out of a currently attached server in order to free a "slot" in the 
workstation's server table.

N_LOGIN() does not change the currently selected server, even if a 
server name is specified. If you want to select the newly attached 
server, use N_SERVER().

The login script on the server is not executed. No drive mappings are 
created. Use N_MAPDRIVE() to create drive mappings.


Example

// Attach and login to server FS1
IF ! N_LOGIN('JOHN', 1, 'DROWSSAP', 'FS1')
   ? 'Unable to login'
   ? 'Error code: ', N_ERROR()
ENDIF

// Login as a Guest on a second server
IF ! N_LOGIN('GUEST', 1, '', 'FS2')
   ? 'Error code: ', N_ERROR()
ENDIF




See Also: N_ASERVER() N_LOGOUT() N_MAPDRIVE() N_SETLOG()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson