C H A P T E R 3

Network Setup Reference

OTCfgGetAreasCount

Obtains the number of areas in the Network Setup database.

OSStatus OTCfgGetAreasCount (CfgDatabaseRef dbRef,

ItemCount* itemCount);

dbRef

On input, a value of type CfgDatabaseRef (page 98) that

 

represents a database session previously opened by calling

 

OTCfgOpenDatabase (page 58).

itemCount

On input, a pointer to value of type ItemCount. On output,

 

itemCount points to the number of areas in the database.

function result

A value of noErr indicates that OTCfgGetAreasCount returned

 

successfully. For a list of other possible result codes, see “Result

 

Codes” (page 110).

DISCUSSION

The OTCfgGetAreasCount function obtains the number of areas that are currently defined in the database. Having the number of areas allows you to call OTCfgGetAreasList (page 68) to get the ID and name of each area.

OTCfgGetAreasList

Obtains the IDs and names of areas in the Network Setup database.

OSStatus OTCfgGetAreasList (CfgDatabaseRef dbRef,

ItemCount* itemCount,

CfgAreaID areaID[],

Str255 areaName[]);

dbRef

On input, a value of type CfgDatabaseRef (page 98) that

 

represents a database session previously opened by calling

 

OTCfgOpenDatabase (page 58).

itemCount

On input, a pointer to a value of type ItemCount that specifies

 

the number of areas for which information is requested. Call

 

OTCfgGetAreasCount (page 68) to determine the number of areas

68Network Setup Functions

Page 68
Image 68
Apple Network Setup manual OTCfgGetAreasCount, OTCfgGetAreasList