Apple Network Setup manual On input, a value of type CfgDatabaseRef page 98 that, function result

Models: Network Setup

1 184
Download 184 pages 5.56 Kb
Page 77
Image 77

C H A P T E R 3

Network Setup Reference

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 in which the entity is to be created. If the area specified by

 

areaID is not writable, OTCfgCreateEntity returns the error

 

kCfgErrLocked. If the area specified by areaID does not exist,

 

OTCfgCreateEntity returns the error kCfgErrAreaNotFound.

entityInfo

On input, a pointer to a CfgEntityInfo (page 99) structure that

 

specifies the class, type, user-visible name, and icon for the

 

entity that is to be created. If an entity of the specified name

 

already exists, OTCfgCreateEntity returns the error

 

kCfgErrEntityAlreadyExists.

entityRef

On input, a pointer to a value of type CfgEntityRef (page 99).

 

On output, entityRef points to an entity reference for the

 

created reference.

function result

A value of noErr indicates that OTCfgCreateEntity returned

 

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

 

Codes” (page 110).

DISCUSSION

The OTCfgCreateEntity function creates an entity in the area specified by areaID with the class, type, user-visible name, and icon specified by the entityInfo parameter.

The area represented by areaID must have been opened by calling

OTCfgBeginAreaModifications (page 63).

The OTCfgCreateEntity function returns a reference to the created entity that can be passed as a parameter to other Network Setup functions, such as OTCfgOpenPrefs (page 84).

Network Setup Functions

77

Page 77
Image 77
Apple Network Setup manual On input, a value of type CfgDatabaseRef page 98 that, function result