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_aserver( <aserver> ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_ASERVER( <aServer> )


Parameters

<aServer>
Array to receive the names of attached servers. Must contain at least 
eight elements.


Returns

Logical true if successful, false otherwise. If unsuccessful, call 
N_ERROR() to obtain an error code.


Description

Fills the array <aServer> with a list of attached servers. NetWare will 
allow up to eight simultaneous connections, so the array should have at 
least eight elements.


Example

/* Search for a user on each file server in the server
   table. Return a list of addresses. */
FUNCTION WhereIs( cUser )
   LOCAL aServers[8], aAddresses := {}
   LOCAL cOldServer, nStation, i
   cOldServer = N_SERVER() // Save preferred server.

   N_ASERVER(aServers)
   FOR i = 1 TO 8
      // Select a server. If the selection is valid...
      IF N_SERVER(i) = aServers[i]
         // ...search for the user.
         nStation = N_WHERE(cUser)

         DO WHILE nStation > 0
            // User found. Add an address to the list.
            AADD(aAddresses, N_NETADDR(nStation, aServers[i]))
            // Restart search at next higher station.
            nStation = N_WHERE(cUser, nStation + 1)
         ENDDO
      ENDIF
   NEXT

   N_SERVER(cOldServer)    // Restore preferred server.
RETURN aAddresses




See Also: N_SERVER() N_SERVNUM()

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