Important: The information in this document is obsolete and should not be used for new development.
DoIdentifyFileA file translation extension must respond to the
kTranslateIdentifyFilerequest code. The Translation Manager uses this request code to allow the translation extension to identify a file as having a format that the extension can translate. You can handle this request by calling the
CallComponentFunctionWithStoragefunction and passing it a pointer to a function with the syntax defined by the
FUNCTION DoIdentifyFile (self: ComponentInstance; theDoc: FSSpec; VAR docKind: FileType) : ComponentResult;
- A component instance that identifies the component containing the translation extension.
- A file system specification record that specifies the document that the translation extension must identify.
- On exit, the file format type of the document as identified by your translation extension.
DoIdentifyFilefunction returns, through the
docKindparameter, the file type of the file specified by the
FSSpecrecord passed in the
theDocparameter. If your translation extension does not recognize the type of the specified file,
DoIdentifyFileshould return the result code
DoIdentifyFilefunction should not return
'TEXT'as a file type unless you determine that the document consists solely of a plain, unformatted stream of ASCII characters.
noErr 0 No error noTypeErr -102 Unrecognized file type