Important: The information in this document is obsolete and should not be used for new development.
DoIdentifyFile
A file translation extension must respond to thekTranslateIdentifyFilerequest 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 theCallComponentFunctionWithStoragefunction and passing it a pointer to a function with the syntax defined by theDoIdentifyFilefunction.
FUNCTION DoIdentifyFile (self: ComponentInstance; theDoc: FSSpec; VAR docKind: FileType) : ComponentResult;
self- A component instance that identifies the component containing the translation extension.
theDoc- A file system specification record that specifies the document that the translation extension must identify.
docKind- On exit, the file format type of the document as identified by your translation extension.
DESCRIPTION
YourDoIdentifyFilefunction returns, through thedocKindparameter, the file type of the file specified by theFSSpecrecord passed in thetheDocparameter. If your translation extension does not recognize the type of the specified file,DoIdentifyFileshould return the result codenoTypeErr.SPECIAL CONSIDERATIONS
YourDoIdentifyFilefunction should not return'TEXT'as a file type unless you determine that the document consists solely of a plain, unformatted stream of ASCII characters.RESULT CODES
noErr 0 No error noTypeErr -102 Unrecognized file type 
 
  
  
 