[prev in list] [next in list] [prev in thread] [next in thread]
List: boost-users
Subject: [Boost-users] [Serialization] Are the serialized char* different
From: jotalo jotalo <jotalo () hotmail ! com>
Date: 2008-08-31 22:41:19
Message-ID: BLU119-W1722E88EAB3CC429C7D570DC5D0 () phx ! gbl
[Download RAW message or body]
Hi,
I use the Bost serialization library to serialize some classes that I put in a char* \
variable ... I have a Server which publish this char* variable and Clients get this \
variable and de-serialize it to obtain the original class...
Everything work fine when servers and clients are running in machines with the same \
architecture (64 or 32 bits)...
But when I run the server in a 64 bits machine, the char* variable is not recognized \
in a 32 bits client. In this code: std::stringstream is;
is.rdbuf()->pubsetbuf(c, m_StringSize);
boost::archive::binary_iarchive *ia = new boost::archive::binary_iarchive(is);
The last line returns the std::exception: "invalid signature"
To be sure that I am not doing something wrong I printed the first 80 characters of \
this variable when it is created in a 64 bits server and a 32 bits server:
In a 64 bits machine server, the print out is:
"........serialization::archive.................MonH1F............Efficiency.(cou" \
(the "." are not printable ascii characters)
in Hexa format it is :
16 00 00 00 00 00 00 00 73 65 72 69 61 6C 69 7A 61 74 69 6F 6E 3A 3A
61 72 63 68 69 76 65 04 04 08 04 08 01 00 00 00 06 00 00 00 00 00 00 00
4D 6F 6E 48 31 46 00 00 00 00 1E 00 00 00 00 00 00 00 45 66 66 69 63 69
65 6E 63 79 20 28 63 6F 75
And ind the case of a 32 bits machine server, it is:
"....serialization::archive.............MonH1F........Efficiency.(counter2/counte"
16 00 00 00 73 65 72 69 61 6C 69 7A 61 74 69 6F 6E 3A 3A 61 72 63 68
69 76 65 04 04 04 04 08 01 00 00 00 06 00 00 00 4D 6F 6E 48 31 46 00 00
00 00 1E 00 00 00 45 66 66 69 63 69 65 6E 63 79 20 28 63 6F 75 6E 74 65
72 32 2F 63 6F 75 6E 74 65
They are similar but not equal...
Thank you, very much
Juan Otalora
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic