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> setprpvalget() / setprpvalset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SetPrpValGet() / SetPrpValSet()
------------------------------------------------------------------------------
 Warning:
 USE WITH EXTREME CAUTION.

 Serious damage can be done to the bindery if it is misused.

 Purpose:
 Get / set a set property value.

 Syntax:
 dwValue = SetPrpValGet( lpszObjName,
           wObjType, lpszPropName, wIndex )
 dwValue = SetPrpValSet( lpszObjName,
           wObjType, lpszPropName, wIndex , dwNewValue )

 Parameters:
 lpszObjName  The object name.
 wObjType     The object type.
 lpszPropName The property name.
 wIndex       The index.
 dwNewValue   The new value.

 Returns:
 A numeric value (unsigned long int).

 Description:
 SetPrpValGet() returns a bindery object ID number in a set property value.

 lpszObjName is the name of the object to query, and wObjType is its type.
 lpszPropName is the name of the set property and wIndex is the index into
 the property value.

 SetPrpValSet() changes the bindery object ID number in a set
 property value and returns the previous setting.

 Set property values are in segments of 128 bytes and split into 32 x 4 byte
 chunks (longs). These chunks contain object ID numbers. For example a user
 group has a set property called GROUP_MEMBERS, which contains a list of the
 users who are members of the group.

 Returns NOVERRLONG if an error occurs.

 Example:
 // To change the object ID of the first member of group EVERYONE to user
 // KATIE, by changing the first element of the associated GROUP_MEMBERS
 // set property value:
 newID = UsrIDGet("KATIE")
 oldID = SetPrpValSet("EVERYONE",OT_USER_GROUP,
         "GROUP_MEMBERS",1,newID)
 ? "Group EVERYONE's first member is ", UsrNameGet(OldID)
 if (SetPrpValGet("EVERYONE", OT_USER_GROUP,"GROUP_MEMBERS",1) =
         newID )
    ? "Group EVERYONE's first member is now KATIE"
 endif

 Notes:
 It is important to be aware that SetPrpValSet() does not
 check for integrity with properties of associated objects. Where
 appropriate use SetPrpIDAdd() instead.

 For further information on property values, see the reference in Chapter 3,
 Bindery Functions.
 May require Supervisor equivalence.

See Also: SetPrpIDAdd() SetPrpIDDel() SetPrpIDTst()

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