Thank you for your response. Sorry that I have not allocate space
enough, but
in my program, I did declare and put null terminate in the code.

The code is more similar with following your example:

static void MyFunc(CharPtr msg)
{
  CharPtr       X;
  VoidHand  MsgHandle;
  
  MsgHandle =MemHandleNew(18);
  X=MemHandleLock(MsgHandle);
  
  StrNCopy(X, msg, 17);  // ERROR.  No memory to hold msg contents
  X[17='\0';
  ....  

  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