Reading VC++ CArchive Binary Format (or Java reading (CObArray))

核能气质少年 提交于 2020-01-11 10:09:12

问题


Is there any clear documentation on the binary formats used to serialize the various MFC data structures? I've been able to view some of my own classes in a hex editor and use Java's ByteBuffer class to read them in (with automatic endianness conversions, etc).

However, I am currently running into issues while trying to bring over the CObArray data, as there seems to be a rather large header that is opaque to me, and it is unclear how it is persisting object type information.

Is there a set of online documentation that would be helpful for this? Or some sample Java code from someone that has dealt with this in the past?


回答1:


Since MFC ships with source code I would create a test MFC application that serializes a CObArray and step through the serialization code. This should give you all the information you need.




回答2:


I agree with jmatthias: use the MFC source code.

There's also this page on MSDN that may be useful.



来源:https://stackoverflow.com/questions/55369/reading-vc-carchive-binary-format-or-java-reading-cobarray

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!