Important: The information in this document is obsolete and should not be used for new development.
TranslateFile
You can useTranslateFile
to translate a document from one format to another.
FUNCTION TranslateFile (sourceDocument: FSSpec; destinationDocument: FSSpec; howToTranslate: FileTranslationSpec) : OSErr;
sourceDocument
- The document to translate.
destinationDocument
- The file to put the translated document into.
howToTranslate
- A buffer of information indicating how to translate the document.
DESCRIPTION
TheTranslateFile
function reads the file specified by thesourceDocument
parameter and translates it into another format. You specify in thedestinationDocument
parameter the name and location of a file to contain the translated data. Note that your application only specifies the name and location for
the file;TranslateFile
creates the file and puts the translated data into it. The destination file must not exist before you callTranslateFile
.The translation is performed according to the information provided in the
howToTranslate
parameter. Usually, you'll get that information by callingCanDocBeOpened
.SPECIAL CONSIDERATIONS
TheTranslateFile
function is not available in all versions of system software; use theGestalt
function to determine whether the Translation Manager is available before calling it.The
TranslateFile
function might cause memory to be moved or purged; you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theTranslateFile
procedure are
Trap macro Selector _TranslationDispatch $000C RESULT CODES