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: More Macintosh Toolbox /
Chapter 7 - Translation Manager / Translation Manager Reference
Translation Manager Routines / Getting Translation Information


GetFileTypesThatAppCanNativelyOpen

You can use the GetFileTypesThatAppCanNativelyOpen function 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
The GetFileTypesThatAppCanNativelyOpen function returns, through the nativeTypes parameter, a list of all the file types that can be opened by the application having the signature appSignature. If GetFileTypesThatAppCanNativelyOpen returns successfully, the nativeTypes parameter contains a list of up to 64 file types. The structure of the list is defined by the TypesBlock data 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
The GetFileTypesThatAppCanNativelyOpen function is not available in all versions of system software; use the Gestalt function to determine whether the Translation Manager is available before calling it.

The GetFileTypesThatAppCanNativelyOpen 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 GetFileTypesThatAppCanNativelyOpen are
Trap macroSelector
_TranslationDispatch$001C

RESULT CODES
noErr0No error
wrgVolTypErr-123Volume does not support Desktop Manager
afpItemNotFound-5012Information not found

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996