Donald C. Kirker wrote:
Yes. I will have to use MemMove as the data I am working with has many NULL characters that represent the end of strings inside of the data, but not the end of the data.
I think my problem might be that there is old data in the buffer when I go to move data into it. Should I use MemSet to set it to 0, or should I free the old buffer, and then recreate the new buffer using the total of the sizes (from the SARBuf struct)? Also, should I place '\0' at the end of the data that is being stored in the struct and at the end of the buffer once I have copied all of the data from the values in the struct to the buffer? Or does it not matter?
Thanks, Donald
Without knowing anything more about the way you receive the data, I would suggest, you store the number of bytes received with each packet, and use this as size to copy. Again, I don't know how WAP data is send, and how it is received. Seems it's not coming over a TCP/IP connection? Temrinating with a NULL character only makes sense if you have character data. When your data contains several NULL characters inside, you can't use a NULL character as termination. You will have to track the size of the received data on your own.
Regards Henk
-- ------------------------------------------------------------------------- Henk Jonas [EMAIL PROTECTED] Palm OS Â certified developer
Please contact me, if you need an off-side contract worker. -------------------------------------------------------------------------
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
