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> dirgroupadd()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DirGroupAdd()
------------------------------------------------------------------------------
 Purpose:
 Add a group to a directory trustee list.

 Syntax:
 bResult = DirGroupAdd( dwGroupID, lpszPath, iRights )

 Parameters:
 dwGroupID The bindery ID number of the group.
 LpszPath  The full NetWare path of the directory.
 IRights   The rights mask.

 Returns:
 A boolean value (TRUE or FALSE).

 The CA-Clipper name for this function is:
 DirGrpAdd()

 Description:
 DirGroupAdd() adds a user group specified by its bindery ID number
 dwGroupID, to the trustee list of a directory specified by lpszPath.
 iRights is the rights that the group will have in the directory. LpszPath
 must be the full NetWare path of the directory, including the volume name,
 e.g. SYS:PUBLIC\MSDOS.

 The rights mask of iRights is calculated by adding values from the
 following table:

 Value NetWare 286 NetWare 386 & NetWare 4.0

 1     Read        Read
 2     Write       Write
 4     Open        Reserved
 8     Create      Create
 16    Delete      Erase
 32    Parental    Access Control
 64    Search      File Scan
 128   Modify      Modify
 256   N/A         Supervisor
 Note that the values mean different things under different versions of
 NetWare. For example, if the group is to have Read, Open and Search rights
 in the specified directory under NetWare 2.15, the mask will be 69 (ie. 1 +
 4 + 64). DirGroupAdd() allows trustee assignments to be set on files under
 NetWare 386.
 Returns FALSE if an error occurs.

 Example:
 // To add user group EVERYONE to the trustee list of SYS:PUBLIC\MSDOS
 // giving it Read, Open and Search rights on a NetWare 286
 // file server:
 if ( DirGroupAdd( GrpIDGet( "EVERYONE" ),"SYS:PUBLIC\MSDOS", 69 ) )
    ? "Group EVERYONE is now a trustee of SYS:PUBLIC\MSDOS"
 endif
 // To add user group ADMIN to the trustee list of SYS:DATA giving it
 // Read, Write and File Scan rights under NetWare 386:
 if ( DirGroupAdd( GrpIDGet( "ADMIN" ),"SYS:PUBLIC\MSDOS", 67 ) )
    ? "Group ADMIN is now a trustee of SYS:DATA"
 endif
 // To add a user group ADMIN to the trustee list of the file
 // SYS:DATA\IAN.TXT under NetWare 386, giving it all rights:
 // this only works under NW386
 if ( DirGroupAdd( GrpIDGet( "ADMIN" ),"SYS:DATA\IAN.TXT", 511 ) )
    ? "Group ADMIN is now a trustee of file SYS:DATA\IAN.TXT"
 endif

 Notes:
 Appropriate trustee access rights are required.

See Also: DirGroupDelete() DirObjectAdd() GrpIDGet()

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