Otcfgopenprefs – Apple Network Setup User Manual
Page 84

C H A P T E R 3
Network Setup Reference
84
Network Setup Functions
OTCfgOpenPrefs
3
Opens an entity so that its preferences can be accessed.
OSStatus OTCCfgOpenPrefs (CfgDatabaseRef dbRef,
const CfgEntityRef* entityRef,
Boolean writer,
CfgEntityAccessID* accessID);
dbRef
represents a database session previously opened by calling
entityRef
On input, a pointer to a value of type
that represents the entity whose preferences are to be read or
written. If the entity does not exist,
OTCfgOpenPrefs
returns the
error
kCfgErrEntityNotFound
.
writer
On input, a Boolean value. If
writer
is
TRUE
, the entity
represented by
entityRef
must be in an area that was opened by
calling
OTCfgOpenPrefs
returns the error
kCfgErrLocked
. If writer is
FALSE
, the entity represented by
entityRef
must be in an open
or
OTCfgOpenPrefs
returns
the error
kCfgErrAreaNotOpen
.
accessID
On input, a pointer to a value of type
accessID
in subsequent calls to get
and set preferences.
function result A value of
noErr
indicates that
OTCfgOpenPrefs
returned
successfully. For a list of other possible result codes, see “Result
Codes” (page 110).
DISCUSSION
The
OTCfgOpenPrefs
function opens the specified entity so that your application
can get or set the value of the preferences the entity contains.
If the value of the
writer
parameter is
TRUE
, you can set preferences as well as
get preferences; otherwise, you can only get preferences.