Apple Network Setup manual OTCfgGetPrefs, function result, void* data, ByteCount length

Models: Network Setup

1 184
Download 184 pages 5.56 Kb
Page 86
Image 86
OTCfgGetPrefs

C H A P T E R 3

Network Setup Reference

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 OTCfgGetPrefs (page 86) to get the value of that preference.

OTCfgGetPrefs

Gets the value of a preference.

OSStatus OTCCfgGetPrefs (CfgEntityAccessID accessID.

OSType prefsType,

void* data, ByteCount length);

accessID

On input, a value of type CfgEntityAccessID (page 100),

 

obtained by previously calling OTCfgOpenPrefs (page 84), that

 

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).

86Network Setup Functions

Page 86
Image 86
Apple Network Setup manual OTCfgGetPrefs, function result, void* data, ByteCount length