GetAccountStatus

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

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 GetAccountStatus (  
      WORD    binderyObjectType,  
      char   *binderyObjectName,  
      long   *balance,  
      long   *limit,  
      long   *holds); 
   
   

Parameters

binderyObjectType
(IN) Specifies the type of bindery object for which the request is being made (see Object Type for specific object types).
binderyObjectName
(IN) Specifies the string containing the name of the bindery object for which the account status request is being made (maximum 48 characters, including the NULL terminator).
balance
(OUT) Receives the amount of value units available to the object to buy services on the network. (Optional: You should pass in a NULL value if the balance parameter does not need to be returned.)
limit
(OUT) Receives the lowest level the object’s account balance can reach before the object can no longer buy services on the network. (Optional: You should pass in a NULL value if the limit parameter does not need to be returned.)
holds
(OUT) Points to a list of objects that have placed a hold on the account (an array of 32 long fields, 16 objects with amounts).

Return Values

Decimal

Hex

Constant

-1

 

OUT OF MEMORY

0

(0x00)

ESUCCESS

192

(0xC0)

ERR_NO_ACCOUNT_PRIVILEGES

193

(0xC1)

ERR_NO_ACCOUNT_BALANCE

196

(0xC4)

ERR_ACCOUNTING_DISABLED

236

(0xEC)

ERR_NO_SUCH_VALUE_SET

254

(0xFE)

ERR_BINDERY_LOCKED

Remarks

GetAccountStatus queries a server’s bindery for the current account status of a specified bindery object by passing the binderyObjectType and binderyObjectName parameters and returning the balance, limit, and holds parameters.

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 that can be from 1 to 48 characters long, including the NULL terminator. Only printable characters can be used. Slashes, backslashes, colons, semicolons, commas, asterisks, spaces, and question marks are prohibited.

The value in the balance parameter represents the object’s account balance, usually in some monetary unit such as cents.

The holds parameter lists servers that have issued SubmitAccountHold calls against the object and the amount reserved by each value-added server. The holds parameter is also the object ID number of a value-added server that has issued a SubmitAccountHold call against the object. Up to 16 servers can place holds on the account at any one time. Multiple holds from the same server are combined. Each server hold is made up of two long fields:

  • The object ID of the server that placed the hold
  • The amount of that server’s hold

A list of each server hold is returned in the account holds parameter.

The GetAccountStatus function does not record an audit record in the SYS:SYSTEM\NET$ACCT.DAT audit file.