SubmitAccountChargeWithLength

Updates the account of a bindery object (For cross-platform functionality, see Developing NLMs with Cross-Platform Functions ( NDK: NLM Development Concepts, Tools, and Functions) and call NWSubmitAccountCharge)

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.x, 4.x, 5.x, 6.x
Platform:NLM
Service:Bindery-Based Accounting

Syntax

   #include <\nlm\nit\nwaccntg.h>  
    
   int SubmitAccountChargeWithLength (  
      WORD    binderyObjectType,  
      char   *binderyObjectName,  
      WORD    serviceType,  
      long    chargeAmount,  
      long    cancelHoldAmount,  
      WORD    commentType,  
      void   *commentData,  
      WORD    commentLength); 
   
   

Parameters

binderyObjectType
(IN) Specifies the type of bindery object whose account is to be updated (see Object Type for specific object types).
binderyObjectName
(IN) Specifies the string containing the name of the bindery object whose account is to be updated (maximum 48 characters, including the NULL terminator).
serviceType
(IN) Identifies the type of service for which the request is being made (usually the object type of the charging account server).
chargeAmount
(IN) Specifies the amount the account server charges for the service it provides.
cancelHoldAmount
(IN) Specifies the amount to be subtracted from the total amount of all holds previously placed by the server. If SubmitAccountHolds was not called before providing the service, this value should be zero.
commentType
(IN) Indicates the type of comment written to the audit report.
commentData
(IN) Specifies the comment data associated with the object’s account charge.
commentLength
(IN) Specifies the length of the commentData parameter.

Return Values

Decimal

Hex

Constant

0

(0x00)

ESUCCESS

192

(0xC0)

ERR_NO_ACCOUNT_PRIVILEGES

193

(0xC1)

ERR_NO_ACCOUNT_BALANCE

194

(0xC2)

ERR_CREDIT_LIMIT_EXCEEDED

196

(0xC4)

ERR_ACCOUNTING_DISABLED

240

(0xF0)

ERR_ILLEGAL_WILDCARD

251

(0xFB)

ERR_INVALID_PARAMETERS

Remarks

SubmitAccountChargeWithLength is identical to SubmitAccountCharge, except that it includes a commentLength parameter. This parameter allows the use of binary data for the commentData parameter ( SubmitAccountCharge expects a NULL-terminated string for commentData).

This function charges an object’s account balance and relinquishes a hold against the object’s account balance. The function can also write a note about the transaction in an audit record (optional). The charge and hold amounts do not have to be the same.

The binderyObjectType and binderyObjectName parameters must uniquely identify the bindery object and must not contain wildcard characters. The binderyObjectName parameter is a NULL-terminated string (maximum 48 characters, including the NULL terminator). Only printable characters can be used. Slashes, backslashes, colons, semicolons, commas, spaces, asterisks, and question marks are prohibited.

The serviceType parameter contains the specific type of service for which the charge is made. External servers should use their object type. If a server provides several different services, and no reasonable object type equivalents exist for these services, the vendor should apply to Novell for a service type. Usually, however, the server should use its object type and distinguish the type of service being charged for in the comment field of the charge record. (See Object Type.

The commentType parameter contains the type of the comment in the comment parameter. Comment types are administered by Novell and are listed below.

  • Connect Time Charge
  • Disk Storage Charge
  • Log In Note
  • Log Out Note
  • Account Locked Note
  • Server Time Modified Note

Developers should contact Novell for unique comment types. Comment types greater than 0x8000 are reserved for experimental purposes. The description is located in the NET$REC.DAT file.

The comment is the entry that the value-added server makes in the audit record. This audit record is contained in the SYS:SYSTEM\NET$ACCT.DAT file.