ResKnife/External/MoreFiles/MoreDesktopMgr.h

1 line
24 KiB
C
Raw Normal View History

2002-03-29 14:59:03 +00:00
/* File: MoreDesktopMgr.h Contains: A collection of useful high-level Desktop Manager routines. If the Desktop Manager is not available, use the Desktop file for 'read' operations. Version: Technology: MoreFiles Release: 1.5.2 Copyright: <20> 1992-2001 by Apple Computer, Inc., all rights reserved. Bugs?: For bug reports, consult the following page on the World Wide Web: http://developer.apple.com/bugreporter/ */ /* You may incorporate this sample code into your applications without restriction, though the sample code has been provided "AS IS" and the responsibility for its operation is 100% yours. However, what you are not permitted to do is to redistribute the source as "DSC Sample Code" after having made changes. If you're going to re-distribute the source, we require that you make it clear in the source that the code was descended from Apple Sample Code, but that you've made changes. */ #ifndef __MOREDESKTOPMGR__ #define __MOREDESKTOPMGR__ #ifndef __MACTYPES__ #include <MacTypes.h> #endif #ifndef __FILES__ #include <Files.h> #endif #include "Optimization.h" #if PRAGMA_ONCE #pragma once #endif #ifdef __cplusplus extern "C" { #endif #if PRAGMA_IMPORT #pragma import on #endif #if PRAGMA_STRUCT_ALIGN #pragma options align=mac68k #elif PRAGMA_STRUCT_PACKPUSH #pragma pack(push, 2) #elif PRAGMA_STRUCT_PACK #pragma pack(2) #endif /*****************************************************************************/ EXTERN_API( OSErr ) DTOpen( ConstStr255Param volName, short vRefNum, short * dtRefNum, Boolean * newDTDatabase); /* The DTOpen function opens a volume's desktop database. It returns the reference number of the desktop database and indicates if the desktop database was created as a result of this call (if it was created, then it is empty). volName input: A pointer to the name of a mounted volume or nil. vRefNum input: Volume specification. dtRefNum output: The reference number of Desktop Manager's desktop database on the specified volume. newDTDatabase output: true if the desktop database was created as a result of this call and thus empty. false if the desktop database was already created, or if it could not be determined if it was already created. Result Codes noErr 0 No error nsvErr -35 Volume not found ioErr -36 I/O error paramErr -50 Volume doesn't support this function extFSErr -58 External file system error - no file system claimed this call. desktopDamagedErr -1305 The desktop database has become corrupted - the Finder will fix this, but if your application is not running with the Finder, use PBDTReset or PBDTDelete */ /*****************************************************************************/ EXTERN_API( OSErr ) DTXGetAPPL( ConstStr255Param volName, short vRefNum, OSType creator, Boolean searchCatalog, short * applVRefNum, long * applParID, Str255 applName); /* The DTXGetAPPL function finds an application (file type 'APPL') with the specified creator on the specified volume. It first tries to get the application mapping from the desktop database. If that fails, then it tries to find an application in the Desktop file. If that fails and searchCatalog is true, then it tries to find an application with the specified creator using the File Manager's CatSearch routine. volName