home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / OpenDoc / CreditNow! / CreditNow! Source / $Utilities / LaunchWithDoc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-30  |  1.3 KB  |  66 lines  |  [TEXT/MPS ]

  1. #if 0
  2. #include <Dialogs.h>
  3. #include <QuickDraw.h>
  4. #include <Windows.h>
  5. #include <Menus.h>
  6. #include <Fonts.h>
  7. #include <appleevents.h>
  8. #include <StandardFile.h>
  9. #include <Aliases.h>
  10.  
  11. #ifdef powerc
  12.    QDGlobals    qd;
  13. #endif
  14. #endif
  15.  
  16.  
  17. #include <processes.h>
  18. #include <files.h>
  19. #include "Launchit.h"
  20.  
  21. OSErr    LaunchMe( FSSpec *launchApp, ProcessSerialNumber *psn )
  22. {
  23.     OSErr    err;
  24.     LaunchParamBlockRec launchThis;
  25.     
  26.     /* set-up the launch parameter block */
  27.     launchThis.launchAppSpec = launchApp;    // rgac &launchApp;
  28.     launchThis.launchAppParameters = nil;    
  29.  
  30.  
  31.     /* launch the thing */
  32.     launchThis.launchBlockID = extendedBlock;
  33.     launchThis.launchEPBLength = extendedBlockLen;
  34.     launchThis.launchFileFlags = nil;
  35.     launchThis.launchControlFlags = launchContinue + launchNoFileFlags + launchDontSwitch;
  36.     err = LaunchApplication(&launchThis);
  37.     
  38.     if( noErr == err )
  39.     {
  40.         psn->highLongOfPSN    = launchThis.launchProcessSN.highLongOfPSN;
  41.         psn->lowLongOfPSN    = launchThis.launchProcessSN.lowLongOfPSN;
  42.     }
  43.     
  44.     return err;    
  45. }
  46.  
  47. #if 0
  48. void main()
  49. {
  50.     FSSpec    launchApp;
  51.     OSErr     err;
  52.  
  53.     InitGraf((Ptr)&qd.thePort);  /* standard setup stuff */
  54.     InitFonts();
  55.     InitWindows();
  56.     InitMenus();
  57.     TEInit();
  58.     InitDialogs(nil);
  59.     InitCursor();
  60.  
  61.     err = LaunchMe( &launchApp );
  62. }
  63.  
  64. #endif
  65.  
  66.