home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!lhc!mcmathmac.nlm.nih.gov!user
- From: mcmath@csb1.nlm.nih.gov (Chuck Bus Error Special McMath)
- Subject: PostHLEvent limits?
- Message-ID: <mcmath-201192142517@mcmathmac.nlm.nih.gov>
- Followup-To: comp.sys.mac.programmer
- Sender: news@nlm.nih.gov
- Organization: MSD
- Date: Fri, 20 Nov 92 19:34:15 GMT
- Lines: 49
-
- I asked about this yesterday, and have updated *my* knowledge base, anyway,
- so thought I'd ask again. I have an app I wrote which uses
- PostHighLevelEvent to send messages to another app on the same machine.
- Here's the code:
-
-
- myEvent.what = kHighLevelEvent;
- myEvent.message = (long)'GENL';
- tLong = (long) 'regi';
- BlockMove(&tLong, &myEvent.where, sizeof(tLong));
-
- myOpts = receiverIDisSignature;
- myRecvID = (long)'MEAS'; /* 'Supervisor' is destination */
-
- SysBeep(1);
- bufH = NewHandle(512L);
- HLock(bufH);
- err = PostHighLevelEvent(&myEvent, myRecvID, 0, *bufH,
- (unsigned long)256, myOpts);
-
- HUnlock(bufH);
- DisposHandle(bufH);
- if (err != noErr)
- Debugger();
-
-
- The problem is that when the buffer size is set to greater than 256, the
- receiving app NEVER GETS THE EVENT. That's right, if the
- PostHighLevelEvent call is changed to this ...
-
- err = PostHighLevelEvent(&myEvent, myRecvID, 0, *bufH,
- (unsigned long)257, myOpts);
-
-
- ...then there is no response from the target app. But if the length is <
- 256, all is well, my target app burps out a message back to this guy, etc.
-
- Is there any reasonable explanation for this? IM 6 doesn't hint at any
- limits for passing data in this manner. Did I miss something? Is this a
- real limit on the amount of data that can be passed? Is my shirttail
- untucked?
-
- chuck
-
-
- |- chuck mcmath - mcmath@csb1.nlm.nih.gov - MSD, Inc. ------------|
- |- National Library of Medicine - National Institutes of Health --|
- |- Bethesda, MD 20894 - Volunteers to be next baseball commish -- |
- |- "Hey batter, hey batter, hey batter, swing" - Anon. -----------|
-