At 03:04 PM 4/12/2004, you wrote:
I have a huge array of binary data that is currently residing in a set
of separately-allocated chunks from the heap (about 300K worth).  I
need to write this data to the "file store" so that it can be later
restored to heap memory.  It is my understanding that this would best
be done by creating a resource database with one resource in it -
namely my binary data.  I plan on using a unique resource type:
"SSnd".  When the data is restored to the heap memory, the file
database will be deleted, so it is like a temporary file.  Is this the
right way to implement the equivalent of an ordinary file with no
record structure imposed on it?

Use a temporary file stream. It's a lot simple, IMO. See the documentation on FileOpen for details. This is the method that Exchange Manager uses to store its temporary stream of data when you receive a beam from another device.



-- Ben Combee, senior DTS engineer, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/



--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to