LoginObject

Logs in the specified object to the specified connection number on the server

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

Syntax

  #include <nwcntask.h>  
   
  int LoginObject  (  
     LONG   connection,   
     char   *objectName,   
     WORD   objectType,   
     char   *password); 
  

Parameters

connection
(IN) Specifies the connection number the object is to be logged in to.
objectName
(IN) Points to the string containing the name of the object.
objectType
(IN) Specifies the type of the object.
password
(IN) Points to the string containing the object’s password (lowercase passwords can be specified).

Return Values

The following table lists return values and descriptions.

Value

Hex

Name and description

0

0x00

ESUCCESS: Logout of object was successful

-1

 

EFAILURE: Connection number not valid

150

0x96

ERR_SERVER_OUT_OF_MEMORY

Remarks

Call SetCurrentConnection first to select the connection, or call GetCurrentConnection to obtain the current connection. The current file server ID does not change.

The objectType parameter classifies an object as a user, user group, server, and so on. The following is a list of well-known object types:

Table 8-1 Well-Known Object Types

Value

Object Type

0xFFFF

Wild

0x0000

Unknown

0x0001

User

0x0002

User Group

0x0003

Print Queue

0x0004

File Server

0x0005

Job Server

0x0006

Gateway

0x0007

Print Server

0x0008

Archive Queue

0x0009

Archive Server

0x000A

Job Queue

0x000B

Administration

0x0024

Remote Bridge Server

0x0047

Advertising Print Server

0x004C

NetWare SQL

0x8000

Reserved up to

An NLM typically uses object type 1 (user) or a type that the developer has requested from Novell®.

LoginObject logs in the object on the specified connection on the local server with the specified object name and type and with the specified password.

To log in as an object on a remote server, you must specify the object’s password for the password parameter. On the local server, an NLM application can log in as an object without specifying the object’s password. This is done by specifying LOGIN_WITHOUT_PASSWORD for the password parameter. If your application uses LOGIN_WITHOUT_PASSWORD, it must ensure that NetWare security is not breached.

See Also

NWLoginToFileServer (Server Management), LogoutObject