C H A P T E R 3

Network Setup Reference

OTCfgSetAreaName

Sets the user-visible name of an area.

OSStatus OTCfgSetAreaName (CfgDatabaseRef dbRef,

CfgAreaID areaID,

ConstStr255Param areaName,

CfgAreaID* newAreaID);

dbRef

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

 

represents a database session previously opened by calling

 

OTCfgOpenDatabase (page 58).

areaID

On input, a value of type CfgAreaID (page 98) that identifies the

 

area whose name is to be set. If the area specified by areaID does

 

not exist, OTCfgSetAreaName returns kCfgErrAreaNotFound.

areaName

On input, a value of type ConstStr255Param that specifies the

 

name to set. If an area of the name specified by areaName already

 

exists, OTCfgSetAreaName returns kCfgErrAreaAlreadyExists.

newAreaID

On input, a pointer to value of type CfgAreaID (page 98). On

 

output, newAreaID points to a new area ID that your application

 

should use for any subsequent calls for the area.

function result

A value of noErr indicates that OTCfgSetAreaName returned

 

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

 

Codes” (page 110).

DISCUSSION

The OTCfgSetAreaName function changes the user-visible name of the specified area and returns a new area ID for that area.

W AR N I N G

Do not change the name of the default area.

Network Setup Functions

67

Page 67
Image 67
Apple Network Setup manual OTCfgSetAreaName