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: Speech Recognition Manager /
Chapter 1 - Speech Recognition Manager / Speech Recognition Manager Reference
Speech Recognition Manager Routines / Manipulating Language Objects


SRNewLanguageObjectFromDataFile

You can use the SRNewLanguageObjectFromDataFile function to read a language object from a data file.

pascal OSErr SRNewLanguageObjectFromDataFile (
SRRecognitionSystem system,
SRLanguageObject *languageObject, 
short fRefNum);
system
A recognition system.
languageObject
On exit, a reference to a new language object.
fRefNum
A file reference number of an open data file.
DESCRIPTION
The SRNewLanguageObjectFromDataFile function returns, in the languageObject parameter, a reference to a language object whose description is stored in the open data file that has the file reference number specified by the fRefNum parameter. SRNewLanguageObjectFromDataFile reads data beginning at the current file mark.

If the language object is successfully created and initialized, the file mark is left at the byte immediately following the language object description. Otherwise, if the language object data is not appropriately formatted, SRNewLanguageObjectFromDataFile returns the result code kSRCantReadLanguageObject as its function result and the file mark is not moved.

SPECIAL CONSIDERATIONS
You should call the SRReleaseObject function to release the language object reference returned by SRNewLanguageObjectFromDataFile when you're done using it.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
22 JAN 1997