Important: The information in this document is obsolete and should not be used for new development.
GetDictionaryInformation
TheGetDictionaryInformation
function returns, in a dictionary information record, information about the specified dictionary.
FUNCTION GetDictionaryInformation (dictionaryReference: LongInt; VAR theDictionaryInformation: DictionaryInformation): OSErr;
dictionaryReference
- A number that specifies a particular open dictionary.
theDictionaryInformation
- Upon completion of the call, contains a filled-out dictionary information record that describes the dictionary.
DESCRIPTION
TheGetDictionaryInformation
function returns data about a dictionary in a dictionary information record in thedictionaryInformation
parameter. TheDictionaryInformation
data type defines this record as follows:
TYPE DictionaryInformation = RECORD dictionaryFSSpec: FSSpec; numberOfRecords: LongInt; currentGarbageSize: LongInt; script: ScriptCode; maximumKeyLength: Integer; keyAttributes: UnsignedByte; END;
Field Description
dictionaryFSSpec
- The file system specification record for this particular dictionary.
numberOfRecords
- The number of records in the dictionary.
currentGarbageSize
- The current size of unusable (garbage) information in the
dictionary. For a discussion of garbage in a dictionary, see "Garbage Data" on page 8-8.script
- The number that specifies the script system this dictionary supports.
maximumKeyLength
- The maximum length of any key in the dictionary.
keyAttributes
- A value that specifies the criteria for key searching. For a description of the key attribute constants, see the description of the
InitializeDictionary
function on page 8-21.SPECIAL CONSIDERATIONS
GetDictionaryInformation
may move memory; your application should not call this function at interrupt time.RESULT CODES
In addition to the standard File Manager and Resource Manager errors,GetDictionaryInformation
may return any of the following result codes.
noErr 0 No error notBTree -410 File is not a dictionary SEE ALSO
Constants for all defined script codes are listed in the chapter "Script Manager" in
this book.File Manager error codes are described in Inside Macintosh: Files. Resource Manager error codes are described in Inside Macintosh: More Macintosh Toolbox.
For sample code that uses the
GetDictionaryInformation
function, see Listing 8-3 on page 8-15.