>In a message dated 12/22/97 2:08 AM, you wrote: > >>In addition to Davids fine suggestions, try to put the ENTERPROC/EXITPROC >>statements in your main file (not the INCLUDE file) and at the very >>beginning so it is in the first CODE segment. If I interpret the symptoms >>correctly, that should do it. >> >>By placing it elsewhere, the location can change resulting in system errors >>when the AE filter looks for it in a place where it no longer exists. > >That's incorrect. For this use, the ENTERPROC/EXITPROC statements can be >anywhere in your program, because you are specifying the address when you >install the handlers. > >The case that you are thinking about is when you use ENTERPROC/EXITPROC >to start off a CDEF, MDEF etc. In those cases, you are not specifying >the address, and the system expects the first line of your program to be >the point of entry. In this situation, what you say is correct: the >ENTERPROC/EXITPROC statements must reside in your MAIN file - not in an >include. Perhaps the oddest part is that the globals, the appleevents shell are all from a generic include that I use over and over in all my projects. This is the first time that things didn't work, so I trying to figure out why. If and when I do, I'll be sure to pass along my stupidity... David : your comment "Also, your EXITPROC should be returning an error code because it is what the Apple Event manager expects. So change it to "EXITPROC = gMyAEErr" or something to that effect." I took the code from the samples provided for FB (Apple Events.MAIN), I checked the manual and in neither place does it state anything like that. Hopefully FB3 will be far more specific and correct. Mel Patrick - theWabbitGuy - mel@... http://www.intergate.bc.ca/business/mel