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> usraccchgadd()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 UsrAccChgAdd()
------------------------------------------------------------------------------
 Purpose:
 Add a charge to a user's account.

 Syntax:
 bResult = UsrAccChgAdd( lpszUserName,
             iServiceType, lAmount,
             iCommentType, lpszComment )

 Parameters:
 lpszUserName The user's name.
 iServiceType The service type (usually the object type of the account
              server).
 lAmount      The amount of the charge.
 iCommType    The comment type (see list in Chapter 2, Accounting
              Functions).
 lpszComment  The comment (see the list in Chapter 2).

 Returns:
 A boolean value (TRUE or FALSE).

 Description:
 UsrAccChgAdd() submits a charge against the user lpszUserName for
 service iServiceType by an account server. The charge amount is
 specified by lAmount and the comment and comment type are for the
 audit trail.

 Returns TRUE if successful, or FALSE if an error occurs.

 Example:
 // To submit a charge of $5.00 against user KATIE.
 if ( UsrAccChgAdd( "KATIE", 1, 500, 0, "" ))
    ? "User KATIE has been charged $5.00"
 endif

 Notes:
 It is preferable to use the function UsrAccResSet() because
 UsrAccResSet() ensures there is a sufficient balance before
 deducting the charge from the user balance.

 Only the account server, Supervisor or an object equivalent to the account
 server or to the Supervisor can submit a charge.

See Also: UsrAccChgDel() UsrAccResGet() FSAccSrvAdd()

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