OK, I don't know in detail what the problem is with, so I'll risk
assuming that you're saving and reusing the BitmapPtr, which would be
meaningless once the Bitmap is reloaded into a different memory location
(since the header itself contains pointers). Whenever I have structures
which include pointers to other structures, I resort to serializing the
data with custom code (and a custom file type), e.g., write(nInt);
write(strlen(szData)); write(len,szData); write(*pBMP)...
I may have misread your problem, but I tried. :)
Fergal Moran wrote:
>
> Hmmm - last post received zero response - I think I may have been a tad
> vague to induce much interest. I'll try being even more vague and cast the
> net further.
>
> Would anyone have any code/pointers that would demonstrate reading/writing a
> structure like this
>
> typedef struct{
> UInt nInt;
> BitmaPtr pBmp;
> CharPtr szData;
> } MyStruct;
>
> I can deal with writing a bitmap alone or writing a structure without a
> bitmap - but when I bring the bmp into the mix it all goes pear shaped. It
> appears to write out fine but when I read it in again it's just gibberish.
>
> Kind regards,
>
> Fergal Moran
> --
> WASP Technologies
> http://www.wasptech.com
> Wireless Application Solutions Provider
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see
>http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/