I'm trying to copy some data received from NetLibReceive into a buffer created with MemHandleNew. It doesn't seem to be working properly at all.
NetLibReceive returns an Int16, and I can see I'm receiving some data via StrPrintF'ing the number of bytes. But when pass the returned Int16 to the UInt32 parameter of MemHandleNew, a zero-length handle is created. Code: Int16 num_bytes_read; num_bytes_read = NetLibReceive(......); // num_bytes_read is now 24, or whatever length was received UInt32 new_buffer_size; new_buffer_size = num_bytes_read; // new_buffer_size is now 0! Why? Is there a macro to convert 16->32? buf = MemHandleNew(new_buffer_size); // buf is 0-length The odd thing is that I swear the same code used to work, but now it doesn't. Thanks, Adam Ernst cosmicsoft -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
