home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!wupost!darwin.sura.net!lhc!mcmathmac.nlm.nih.gov!user
- From: mcmath@csb1.nlm.nih.gov (Chuck Expansion Draft Fodder McMath)
- Subject: PostHighLevelEvent buffer limit?
- Message-ID: <mcmath-191192151434@mcmathmac.nlm.nih.gov>
- Followup-To: comp.sys.mac.programmer
- Sender: news@nlm.nih.gov
- Organization: MSD
- Date: Thu, 19 Nov 92 20:25:57 GMT
- Lines: 46
-
- I'm having a small problem which surfaced just recently. I have two Mac
- applications (both of which I wrote) which pass data back and forth using
- high level events. The code was written a few months ago and tested out
- ok.
-
- The problem is that I just changed the initial write to send out a rather
- large bufferful of data (actually only about 4K). Here are the two calls:
-
- Exhibit A:
- err = PostHighLevelEvent(theMsgEvent, (unsigned long)&itsPSN, 0,
- (Ptr)&buffer, bufSize, theOptions);
-
- Exhibit B:
- err = PostHighLevelEvent(theMsgEvent, (unsigned long)&itsPSN, 0,
- nil, 0, theOptions);
-
-
- Exhibit B works fine. The recipient does get the event, and all is well.
- Exhibit A, however, is another story. The recipient NEVER GETS the event,
- and the error returned from this call is zero. Both bufSize and theOptions
- are declared as longs.
-
- I decided to try something different:
-
- Exhibit C:
- err = PostHighLevelEvent(theMsgEvent, (unsigned long)&itsPSN, 0,
- (Ptr)&buffer, 1L, theOptions);
-
- This one works also. So far, values of 0, 1, and 512 have worked, and a
- value of 1024 did not. Note that the bufSize sent in Exhibit A was
- determined by the statement:
- bufSize = sizeof(buffer);
-
- I don't know what to do. IM6 does not reveal any light on this problem I'm
- having. Is there some inherent (unknown to me) buffer size limit on Post
- HL Event? Why would a big buffer size cause the target app to never
- receive the event?
-
- Running on a IIfx with 32 MB of RAM, MPW 3.2.3, C++ 3.2.4, MacApp 3.0.1
-
- 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. -----------|
-