There's two possible problems: one, you don't allocate enough memory for the 
buffer for StrPrintF, or two, you dispose of it too quickly.

I use the following code in Codewarrior a decent amount for error checking. The 
important thing to note is the buffer must be the maximum size that StrPrintF 
can form from your operation plus one for the terminator.

{
  char *str=new char[5];
  StrPrintF(str, "%x", (Int16) var);
  Warning(str); //custom dialog box
  delete [] str;
}

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to