Otcfggetprefstoc, E calling – Apple Network Setup User Manual
Page 89

C H A P T E R 3
Network Setup Reference
Network Setup Functions
89
OTCfgGetPrefsTOC
3
Gets a list of the preferences in an entity.
OSStatus OTCfgGetPrefsTOC (CfgEntityAccessID accessID.
ItemCount* itemCount,
CfgPrefsHeader prefsTOC[]);
accessID
On input, a value of type
obtained by previously calling
identifies the entity whose preferences are to be obtained.
itemCount
On input, a pointer to a value of type
ItemCount
that specifies
the requested number of preferences.
On output,
itemCount
contains the number of preferences that were obtained.
prefsTOC
(page 100) structures. The
prefsTOC
parameter must have enough
CfgPrefsHeader
structures to store all of the preferences in the entity.
function result A value of
noErr
indicates that
OTCfgGetPrefsTOC
returned
successfully. For a list of other possible result codes, see “Result
Codes” (page 110).
DISCUSSION
The
OTCfgGetPrefsTOC
function obtains information about the specified number
preferences in the entity represented by
accessID
and stores them in the
prefsTOC
array.
Before you call
OTCfgPrefsTOC
, you must should find out how many preferences
▲
W AR N I N G
Early versions of Network Setup do not determine whether
there is enough space in
prefsTOC
(as specified on input by
itemCount
) and can write beyond the end of the array. You
should always call
OTCfgGetPrefsTOCCount
before calling
OTCfgGetPrefsTOC
. When you call
OTCfgGetPrefsTOC
, set
itemCount
to the value returned by
OTCfgGetPrefsTOCCount
in the
itemCount
parameter.
▲