Thank you for your response. An error occured in my program, it seems
that too much dynamic 
memory is used, PALM OS crashed.

The code is similar with following your example:

static void MyFunc(CharPtr msg)
{
  CharPtr       X;
  Char  Y[10];
  VoidHand  MsgHandle;
  
  MsgHandle =MemHandleNew(10);
  X=MemHandleLock(MsgHandle);
  
  StrNCopy(X, msg, 17);    // ERROR.  No memory to hold msg contents
  StrNCopy(Y, msg, 17);    // OK if msg has less than 10 chars
  
  ....  

  MemHandleUnlock(recordH);
  MemHandleFree(MsgHandle);

}


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to