NWGetAccountStatus

Returns the account status of a NetWare® server bindery or NDS™ object including its balance, credit limit, and holds

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:Accounting

Syntax

   #include <nwacct.h> 
   or 
   #include <nwcalls.h> 
    
   NWCCODE N_API NWGetAccountStatus ( 
      NWCONN_HANDLE         conn,  
      nuint16               objType,  
      const nstr8 N_FAR    *objName,  
      pnint32               balance,  
      pnint32               limit,  
      HOLDS_STATUS N_FAR   *holds); 
   
   

Pascal Syntax

   uses calwin32 
    
   Function NWGetAccountStatus   
     (conn : NWCONN_HANDLE; 
      objType : nuint16; 
      const objName : pnstr8; 
      balance : pnint32; 
      limit : pnint32; 
      Var holds : HOLDS_STATUS 
   ) : NWCCODE; 
   
   

Parameters

conn
(IN) Specifies the NetWare server connection handle.
objType
(IN) Specifies the type of the object for which the status is desired.
objName
(IN) Points to a string containing the name of the object for which the accounting status is desired. (48 characters maximum or will be truncated.)
balance
(OUT) Points to the amount of value units available to the object to buy services on the network (optional, pass in NULL).
limit
(OUT) Points to the lowest level the object’s account balance can reach before the object can no longer buy services on the network (optional, pass in NULL).
holds
(OUT) Points to HOLDS_STATUS containing a list of objects placing a hold on the object’s account (optional, pass in NULL).

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x890A

NLM_INVALID_CONNECTION

0x8996

SERVER_OUT_OF_MEMORY

0x89C0

NO_ACCOUNTING_PRIVILEGES

0x89C1

LOGIN_DENIED_NO_ACCOUNT_BALANCE

0x89C4

ACCOUNTING_DISABLED

0x89E8

NOT_ITEM_PROPERTY

0x89EA

NO_SUCH_MEMBER

0x89EB

NOT_GROUP_PROPERTY

0x89EC

NO_SUCH_SEGMENT

0x89EF

INVALID_NAME

0x89F0

WILD_CARD_NOT_ALLOWED

0x89FC

NO_SUCH_OBJECT

0x89FE

BINDERY_LOCKED

0x89FF

HARDWARE_FAILURE

Remarks

NWGetAccountStatus queries a NetWare server’s Bindery or Directory bindery context for the current account status of a specified object by passing the object name and type. NWGetAccountStatus returns the object’s balance, limit and holds.

balance contains the object’s account balance, usually in some established monetary unit such as cents.

holds lists servers calling NWSubmitAccountHold against the object and the amount reserved by each value-added server. holds also lists the object ID number of a value-added server calling NWSubmitAccountHold against the object. Up to 16 servers can place holds on the account at one time. Multiple holds from the same server are combined. Each server hold is made up of two fields: (1) the object ID of the server placing the hold, and (2) the amount of the server’s hold.

The ACCOUNT_SERVERS property on the server must contain the object ID of the requesting server. Otherwise, NWSubmitAccountHold will return NO_ACCOUNTING_PRIVILEGES. The user must have an ACCOUNT_BALANCE property on the NetWare server or NWSubmitAccountHold will return LOGIN_DENIED_NO_ACCOUNT_BALANCE.

NCP Calls

See Also

NWQueryAccountingInstalled, NWSubmitAccountCharge, NWSubmitAccountHold, NWSubmitAccountNote