Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>nnetscnbin()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETSCNBIN()
 Scans a bindery for an object
------------------------------------------------------------------------------
 Syntax

     NNETSCNBIN(<cObjMask>,[@]<nType>,[@]<NId>,
        [@<nObjFlag>],[@<nObjSafe>],[@<lObjProp>],
        [<cServer>|<nConId>]) --> cObjName

     Netware: 2.2 and 3.11

 Arguments

     <cObjMask>  Designates a search mask that is satisfied by the
     bindery objects that are searched.  <cObjMask> can contain the wildcard
     characters "*" and "?" according to DOS regulations.  The default value
     is "*".

     <nType>  Designates the object type that is searched.  The header
     file CTNNET.CH contains symbolic constants for a number of object types.
     When you work with numeric values, NNETSCNBIN() expects the object type
     in the high-low format for efficiency reasons.  If <nType> is passed by
     reference, the variable contains the type of the object found after the
     function has been completed successfully.

     <NId>  Contains the object ID (high-low format) of the last object
     found.  To start the search with the first object, <NId> must be
     designated -1.  If <NId> is passed by reference, the variable contains
     the ID of the object found after the function has been completed
     successfully.

     <nObjFlag>  Designates whether the object found is static (0) or
     dynamic (1).  This parameter must be passed by reference.  In this case,
     the variable contains the object flag after the function has been
     completed successfully

     <nObjSafe>  Designates the object security as an eight-bit number.
     The four high-order bits control the security level for the object's
     write access; the four low-order bits control the object's read access.
     This parameter must be passed by reference.  In this case, the variable
     contains the object security after the function has been completed
     successfully.  A table for access levels can be found with the
     NNETCRTOBJ() function.

     <lObjProp>  Designates whether the object has property (.T.) or not
     (.F.).  This parameter must be passed by reference.

     <cServer>   Designates the name of the file server for which the
     bindery is accessed.  Your workstation must be attached to <cServer>.

     <nConId>  Designates the connection ID of your workstation on
     <cServer>.

 Returns

     NNETSCNBIN() returns the name of the binary object that is found.  If no
     object has been found, the function returns a null string.  If the
     parameters <nType>, <NId>, <nObjFlag>, <nObjSafe>, and/or <lObjProp> are
     passed by reference, NNETSCNBIN() returns the object type, the object
     ID, the object flag, the object security, and a flag for property
     existence (see the arguments).

 Description

     Important!  NNETSCNBIN() is a low level bindery function and should
     be used only with extensive knowledge of the bindery concept and the
     Novell API.

     NOVELL NET SCAN BINDERY
     NNETSCNBIN() allows you to scan the bindery of a file server for objects
     that satisfy a specified search mask (<cObjMask>) and a defined type
     (<nType>).  To find the first object that matches the passed criterion,
     the parameter <NId> must be designated -1.  For a successive search, the
     object ID must be passed by reference to use the ID of the object that
     is found at the next function call.  To find objects of any type, the
     parameter <nType> must contain -1 or the symbolic constant OBJ_WILD.
     With the parameters <cServer> or <nConId>, the bindery of any attached
     file server can be accessed.  The connection ID of a server is returned
     by NNETATTACH() or NNETLOGIN().

 Note

     .  The object type and the object ID are expected in the high-low
        format (see the Introduction to this chapter).

 Example

     List the names and types of all bindery objects on the default server:

     #include "ctnnet.ch"

     nId:=-1          // Start with the 1st object
     WHILE .T.
     nType=OBJ_WILD   // all objects
     IF EMPTY(cName:=NNETSCNBIN('*',@type,@ID))
     EXIT
     ENDIF
     ? cName,nType
     ENDDO

See Also: NNETCRTOBJ() NNETSCNPRP()

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