Apple Network Setup User Manual

Page 32

Advertising
background image

C H A P T E R 2

Using Network Setup

32

Working with Entities

SetHandleSize( (Handle) entityRefs, entityCount * sizeof(CfgEntityRef) );

err = MemError();

}

if ((err == noErr) && (entityInfos != nil)) {

SetHandleSize( (Handle) entityInfos, entityCount * sizeof(CfgEntityInfo) );

err = MemError();

}

if (err == noErr) {

if (entityRefs == nil) {

paramRefs = nil;

} else {

sRefs = HGetState( (Handle) entityRefs );

assert(MemError() ==

noErr);

HLock( (Handle) entityRefs );

assert(MemError() ==

noErr);

paramRefs = *entityRefs;

}

if (entityInfos == nil) {

paramInfos = nil;

} else {

sInfos = HGetState( (Handle) entityInfos );

assert(MemError() ==

noErr);

HLock( (Handle) entityInfos );

assert(MemError() ==

noErr);

paramInfos = *entityInfos;

}

err = OTCfgGetEntitiesList(dbRef, area,

entityClass, entityType,

&entityCount, paramRefs, paramInfos);

if (entityRefs != nil) {

HSetState( (Handle) entityRefs, sRefs );

assert(MemError() ==

noErr);

}

if (entityInfos != nil) {

HSetState( (Handle) entityInfos, sInfos );

assert(MemError() ==

noErr);

Advertising