Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> fsobjlst()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FSObjLst()
------------------------------------------------------------------------------
 Purpose:
 List objects in the file server's bindery.

 Syntax:
 lpszObjectName= FSObjLst( lpszSearchSpec, wObjectType, bStartFlag )

 Parameters:
 lpszSearchSpec The bindery object spec.
 wObjectType    The type of bindery object.
 bStartFlag     Flag to signify start of list.

 Returns:
 A character string of length 47.

 Description:
 FSObjLst() is used to verify the existence of specified object(s) in
 the NetWare bindery on the default or current preferred file server.
 Bindery object types can be users, file servers, groups, etc. and
 are specified by the type parameter wObjectType, as per the common type
 list below.

 The function is initially called with lpszSearchSpec containing the name of
 the required object(s), wObjectType the type of object and bStartFlag set
 to TRUE. lpszSearchSpec can contain the wildcard characters "*" and "?" if
 more than one object is to be retrieved. FSObjLst() returns the first
 matching object.

 Subsequent repeated calls with bStartFlag set to FALSE return the names of
 other objects. Returns an empty string when there are no further objects to
 recall or if an error occurs.

 Valid bindery object types are:

 Object Type       Parameter (wObjectType)
 ALL OBJECTS       -1
 UNKNOWN TYPE       0
 USERS              1
 USER GROUPS        2
 PRINT QUEUES       3
 FILE SERVERS       4
 JOB SERVERS        5
 GATEWAYS           6
 PRINT SERVERS      7
 ARCHIVE QUEUES     8
 ARCHIVE SERVERS    9
 JOB QUEUES        10

 Example:
 // To verify the existence of a user whose login name is "SALLY":

 if ( !empty ( FSObjLst( "SALLY", OT_USER, TRUE ) )
    ? "User SALLY exists"
 endif

 // To display the login names of all users in the NetWare bindery:
 // Get first user name

 lpszUserName = FSObjLst( "*", OT_USER, TRUE )
 do while !empty( lpszUserName )  // Loop while users found
    ? lpszUserName             // Display the user
 name
    lpszUserName = FSObjLst("*", OT_USER, FALSE) // Get next
 enddo

 // To display the names of all print queues in the NetWare bindery:

 lpszQueueName = FSObjLst( "*", OT_PRINT_QUEUE, TRUE )
 do while !empty( lpszQueueName )    // Loop while queues found
    ? lpszQueuename            // Display the queue name
    lpszQueuename=FSObjLst("*",OT_PRINT_QUEUE,FALSE) // Next
 enddo

 Notes:
 Netware allows 65,536 types of bindery objects. 0 to 8000h are
 reserved, while 8001h to FFFFh can be used by anyone. See the description
 of objects in Chapter 3, Bindery Functions.

 After an empty string is returned, check NWErrorGet().

See Also: ObjNmeGet() ObjIDGet() ObjTypGet() ObjPrpLst()

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