
Am Wednesday 23 December 2009 02:22:09 schrieb Dan:
Hi All,
Im not sure if this the correct mailing list or not.. in fact im not sure if i'm even going about this the right way.. forums are so much easier..
there is a boost-users mailing list on the same site you joined this one. but I would like to see a message board on the boost website as well. noone is used to mailing lists anymore.
Im using the boost::serialization library, im attempting to serialize an image file from the freeimage library.
It is working beautifully if i serialize to a text archive however, binary archives fail to load with a "stream error" exception.
is your stream a std::ios::binary stream? see http://www.boost.org/doc/libs/1_41_0/libs/serialization/doc/special.html#bin...
boost::serialization::array<BYTE> ao = boost::serialization::make_array<BYTE>(pData, dwSize); ar & ao;
your code looks ok. you can replace this part with ar.load_binary(pData,dwSize). (this has nothing to do with the exception you're getting though, it's just easier to read.)