home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / SimpleTrap / Sources / SignatureToApp.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  1.5 KB  |  53 lines

  1. /*
  2.     File:        SignatureToApp.h
  3.  
  4.     Contains:    
  5.  
  6.     Written by:    Jens Alfke     
  7.  
  8.     Copyright:    Copyright © 1991-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/27/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23.  
  24. #ifndef __SIGNATURETOAPP__
  25.     #define __SIGNATURETOAPP__
  26.  
  27. #ifndef __PROCESSES__
  28.     #include <Processes.h>
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. typedef enum{
  36.     Sig2App_FindProcess        =0,
  37.     Sig2App_FindApplication,
  38.     Sig2App_LaunchApplication
  39. } Sig2App_Mode;
  40.  
  41. OSErr
  42. SignatureToApp(    OSType sig,                        // Signature of app
  43.                 ProcessSerialNumber *psn,        // Returns PSN of app (ignored if NULL)
  44.                 FSSpec *fileSpec,                // Returns location of app (ignored if NULL)
  45.                 Boolean *launched,                // Set to TRUE if I had to launch (ignored if NULL)
  46.                 Sig2App_Mode mode,                // Mode -- find proc/find app/launch app
  47.                 LaunchFlags launchControlFlags    // Launch control flags; see Process Mgr
  48.               );
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52.  
  53. #endif