>Under 3.0 and 3.1, this was fine:
>
> char serPortBuf[1024];
> ...
> SerSetReceiveBuffer(serialPortRef,&serPortBuf,sizeof serPortBuf);
>
>However, POSE with a 3.3 debug ROM is claiming that serPortBuf is in low
>memory, and this seems to follow user reports that the app isn't stable
>under 3.3.
>
>Any ideas (outside of NewSerialMgr) ?
Allocate the memory instead. ie,
// Allocate the buffer
fSerRcvQueue = MemPtrNew(myMinSerRcvBufSize);
if (fSerRcvQueue == 0)
err = memErrNotEnoughSpace;
if (err) goto out;
// Use our own buffer
err = SerSetReceiveBuffer(
fSerLibRefNum, fSerRcvQueue, MemPtrSize(fSerRcvQueue));
if (err) goto out;
When you close down, make sure you pass that same pointer back in, ie..
// Set the receive buffer back the way we found it
if (fSerRcvQueue) {
// Restore the Serial Manager's default receive queue
err = SerSetReceiveBuffer(fSerLibRefNum, fSerRcvQueue, 0);
// Free the buffer we created
err = MemPtrFree(fSerRcvQueue);
fSerRcvQueue = 0;
}
Brian
_____________________________________________________________________
Mark/Space Softworks voice 408-293-7299
111 West Saint John, 3rd Floor fax 408-293-7298
San Jose, CA 95113 <http://www.markspace.com>
PalmOS, Mac OS, Windows and Web Software & Solutions:
PageNOW! Wireless Messaging, PhoneWatcher Caller ID,
Online & Communicate terminal emulation and serial debugging