[comp.sys.mac] Exciting questions on Macintosh SE !!!

newton@mtund.ATT.COM (Newton Lee) (04/18/88)

Hi, does anyone know the answers to the following questions relating to
the Macintosh SE?

1. I want my program to reside in memory all the time while it launches
   other applications.  I tried placing my program into an INIT resource
   but the system blew up with error ID = 2.  Why?  Could it be the problem
   of relocatable references created by the C compiler?

2. My program has to capture all keyboard and mouse events before they
   get to the other application.  One way to do this is to patch the
   system traps GetOSEvent and OSEventAvail.  Also, I have to install
   a JMP instruction in the system heap to jump to my program in the
   application heap.  Are there any better ways?  Are there any example
   source codes that do this?

3. I want my program to be able to read from some existing .snd resources
   and play the sounds.  However, SndPlay (trap address 0xA805) doesn't seem
   to exist in system 4.1 and I got a run-time error.  On the other hand,
   I don't know how to use StartSound function to interpret .snd resources.
   I couldn't find any book (except Inside Mac vol. 2 and 5) that talks
   about it.  Any ideas?

Thanks. Your help is greatly appreciated.

- Newton (mtund!newton 201/576-3541)