I believe you (that it works before and doesn't work now)... I think it should work. May be try to cast it.
Int16 num_bytes_read; num_bytes_read = NetLibReceive(......); // If you need the variable new_buffer_size for anything then // do UInt32 new_buffer_size = (UInt32)num_bytes_read; // otherwise ... UInt8 *buf = NULL; if (num_bytes_reads > 0) { buf = (UInt8 *)MemPtrNew((UInt32) num_bytes_read); // type cast to (UInt8 *) or to whatever you define buf if (!buf) { // error } else { // use buf } } Hope it works, tnn -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/