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

 Syntax:
 bResult = UsrAccountChargeAdd( 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).

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

 Description:
 UsrAccountChargeAdd() 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 ( UsrAccountChargeAdd( "KATIE", 1, 500, 0, "" ))
    ? "User KATIE has been charged $5.00"
 endif

 Notes:
 It is preferable to use the function UsrAccountReserveSet() because
 UsrAccountReserveSet() 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: UsrAccountChargeDelete() UsrAccountReserveGet() FSAccountServerAdd()

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