Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 8 - Dictionary Manager / Dictionary Manager Reference
Routines / Accessing a Dictionary


GetDictionaryInformation

The GetDictionaryInformation 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
The GetDictionaryInformation function returns data about a dictionary in a dictionary information record in the dictionaryInformation parameter. The DictionaryInformation 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.
noErr0No error
notBTree-410File 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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996