Otcfggetprefs, Visible name, call – Apple Network Setup User Manual
Page 86

C H A P T E R 3
Network Setup Reference
86
Network Setup Functions
function result A value of
noErr
indicates that
OTCfgGetPrefsSize
returned
successfully. For a list of other possible result codes, see “Result
Codes” (page 110).
DISCUSSION
The
OTCfgGetPrefsSize
function gets the size in bytes of the preference specified
by
prefsType
in the entity represented by
accessID
.
For variable-length preferences, you should call
OTCfgGetPrefsSize
to get the
size of a preference before it calls
that preference.
OTCfgGetPrefs
3
Gets the value of a preference.
OSStatus OTCCfgGetPrefs (CfgEntityAccessID accessID.
OSType prefsType,
void* data,
ByteCount length);
accessID
obtained by previously calling
identifies the entity containing the preference whose value is to
be obtained.
prefsType
On input, a value of type
OSType
that identifies the preference
whose value is to be obtained. See“Protocol Constants and
Other Data Types” (page 159) for protocol-specific preferences.
data
On input, a pointer to the buffer into which the value of the
preference is to be placed. On output,
data
contains the value of
the preference specified by
prefsType
.
length
On input, a value of type
ByteCount
that is the size in bytes of
the buffer pointed to by
data
.
function result A value of
noErr
indicates that
OTCfgGetPrefs
returned
successfully. For a list of other possible result codes, see “Result
Codes” (page 110).