Apple PowerBook 520 Technical Information Page 102

  • Download
  • Add to my manuals
  • Print
  • Page
    / 144
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 101
CHAPTER 5
Software
88 Control Strip Module Reference
SBOpenModuleResourceFile 5
You can use the SBOpenModuleResourceFile routine to open a module resource file.
pascal short SBOpenModuleResourceFile(OSType fileCreator);
The SBOpenModuleResourceFile routine opens the resource fork of the module
file whose creator is fileCreator, and return the file’s reference number as its result.
If the file cannot be found or opened, SBOpenModuleResourceFile returns a result
of –1.
SBOpenModuleResourceFile provides a means for a module to load in large or
infrequently used resources that it doesn’t usually need, but that it requires for a
particular operation.
SBLoadPreferences 5
You can use the SBLoadPreferences routine to load a resource from a preferences file.
pascal OSErr SBLoadPreferences(ConstStr255Param prefsResourceName,
Handle *preferences);
The SBLoadPreferences routine loads a resource containing a module’s configuration
information from the control strip’s preferences file. The PrefsResourceName
parameter points to a Pascal string containing the name of the resource. The
Preferences parameter points to a variable that will hold a handle to the resource read
from the file. The handle does not need to be preallocated.
If either prefsResourceName or preferences contains a nil pointer,
SBLoadPreferences does nothing and returns a result of paramErr. If the resource is
successfully loaded, it returns a result of 0. SBLoadPreferences can also return other
Memory Manager and Resource Manager errors if it fails during some part of the
process.
SBSavePreferences 5
You can use the SBSavePreferences routine to save a resource to a preferences file.
pascal OSErr SBSavePreferences(ConstStr255Param prefsResourceName,
Handle preferences);
The SBSavePreferences routine saves a resource containing a module’s configuration
information to the control strip’s preferences file. The PrefsResourceName parameter
Page view 101
1 2 ... 97 98 99 100 101 102 103 104 105 106 107 ... 143 144

Comments to this Manuals

No comments