Important: The information in this document is obsolete and should not be used for new development.
GetFileTypesThatAppCanNativelyOpen
You can use theGetFileTypesThatAppCanNativelyOpenfunction to obtain a list of file types that an application can open by itself.
FUNCTION GetFileTypesThatAppCanNativelyOpen (appVRefNumHint: Integer; appSignature: OSType; VAR nativeTypes: TypesBlock): OSErr;
appVRefNumHint- The volume reference number of volume containing the application. The search for the specified application begins on this volume; if the application isn't found there, the search continues to other mounted volumes.
appSignature- The signature of the application.
nativeTypes- On exit, a zero-terminated file types that the application can open without translation.
DESCRIPTION
TheGetFileTypesThatAppCanNativelyOpenfunction returns, through thenativeTypesparameter, a list of all the file types that can be opened by the application having the signatureappSignature. IfGetFileTypesThatAppCanNativelyOpenreturns successfully, thenativeTypesparameter contains a list of up to 64 file types. The structure of the list is defined by theTypesBlockdata type.
TYPE TypesBlock = ARRAY[0..63] OF FileType; TypesBlockPtr = ^TypesBlock;If fewer than 64 types are returned, the end of the list is indicated by an entry whose value is 0.SPECIAL CONSIDERATIONS
TheGetFileTypesThatAppCanNativelyOpenfunction is not available in all versions of system software; use theGestaltfunction to determine whether the Translation Manager is available before calling it.The
GetFileTypesThatAppCanNativelyOpenfunction 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 forGetFileTypesThatAppCanNativelyOpenare
Trap macro Selector _TranslationDispatch $001C RESULT CODES
noErr 0 No error wrgVolTypErr -123 Volume does not support Desktop Manager afpItemNotFound -5012 Information not found