Apple Network Setup Instrukcja Użytkownika Strona 41

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 184
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 40
CHAPTER 2
Using Network Setup
Reading and Writing Preferences 41
assert(dbRef != nil);
assert(entity != nil);
prefsTOC = nil;
err = OTCfgOpenPrefs(dbRef, entity, false, &accessID);
if (err == noErr) {
err = OTCfgGetPrefsTOCCount(accessID, &prefsTOCCount);
if (err == noErr) {
prefsTOC = (CfgPrefsHeader *) NewPtr(prefsTOCCount *
sizeof(CfgPrefsHeader));
err = MemError();
}
if (err == noErr) {
err = OTCfgGetPrefsTOC(accessID, &prefsTOCCount, prefsTOC);
}
if (err == noErr) {
for (prefsTOCIndex = 0; prefsTOCIndex < prefsTOCCount; prefsTOCIndex++) {
prefType = prefsTOC[prefsTOCIndex].fType;
prefSize = prefsTOC[prefsTOCIndex].fSize;
printf("type = '%4.4s', size = %ld\n", &prefType, prefSize);
}
}
err2 = OTCfgClosePrefs(accessID);
if (err == noErr) {
err = err2;
}
}
if (prefsTOC != nil) {
DisposePtr( (Ptr) prefsTOC ); assert(MemError() ==
noErr);
}
if (err != noErr) {
printf("Failed with error %ld.\n", err);
}
}
Przeglądanie stron 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 183 184

Komentarze do niniejszej Instrukcji

Brak uwag