Preference utilities, Preference utilities 3 – Apple Network Setup User Manual
Page 92

C H A P T E R 3
Network Setup Reference
92
Network Setup Functions
data
On input, a pointer to the buffer into which the default value is
to be placed. On output,
data
points to the default value. If the
buffer is too small to hold the default value,
OTCfgGetTemplate
returns as much data as possible and returns the error
kCFGErrDataTruncated.
If you want to get the size of the default
value but not the default value itself, set data to
NULL
.
dataSize
On input, a pointer to a value of type
ByteCount
. On output,
dataSize
points to the number of bytes in the buffer pointed to
by
data
. On input, if
data
is
NULL
, on output,
dataSize
points to
the size in bytes of the default value for the specified preference.
function result A value of
noErr
indicates that
OTCfgGetTemplate
returned
successfully. For a list of other possible result codes, see “Result
Codes” (page 110).
DISCUSSION
The
OTCfgGetTemplate
function gets the default value for the preference
identified by the
entityClass
,
entityType
, and
prefsType
parameters and stores
it in the buffer described by
data
and
dataSize
.
IMPORTANT
The
OTCfgGetTemplate
function is available in Network
Setup version 1.2 and later. It returns the same data that
(page 90) returns, but the parameters have
been changed to be consistent with the parameters of other
Network Setup functions. If you rely on Network Setup 1.2
or later, call
OTCfgGetTemplate
. If you need to work with
earlier versions of Network Setup, you can safely continue
to call
OTCfgGetDefault
.
▲
Preference Utilities
3
Use the following functions to encrypt and decrypt preferences:
■
■