Questions tagged [carchive]
32 questions
6
votes
2 answers
What is the file format that the C++ MFC object CArchive writes to?
I am trying to read in with C# a file written with CArchive. From what I can tell the format is:
[length of next set of data][data]...etc
I'm still fuzzy on some of the data, though. How do I read in Date data? What about floats, ints, doubles,…

Mike Webb
- 8,855
- 18
- 78
- 111
6
votes
0 answers
Reading a serialized binary file generated by CArchive MFC in Python
I have binary files generated from serialized C++ objects using MFC CArchive. I want to write Python code to read these binary files.
What is an equivalent function or class in Python or pyqt that can read snd deserialized files?
I have looked at…

Feb
- 61
- 3
3
votes
2 answers
Reading a WORD variable from a CArchive and casting to int at the same time
This might sound basic but:
WORD wSong = 0;
CArchive ar;
...
ar >> wSong;
m_sPublicTalkInfo.iSongStart = static_cast(wSong);
At the moment I read the WORD into a specific variable and the cast it.
Can I read it in and cast at the same…

Andrew Truckle
- 17,769
- 16
- 66
- 164
3
votes
2 answers
Reading VC++ CArchive Binary Format (or Java reading (CObArray))
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…

jsight
- 27,819
- 25
- 107
- 140
3
votes
1 answer
Can CArchive read and write from a specified location of a file?
I want to serialize and deserialize a list of objects into a file. But I found that if I use CArchive, the new content will overwrite the original content in the file, which is not my expectation. Is there any method to allow me to read and write…

user26404
- 1,371
- 4
- 27
- 38
2
votes
1 answer
Where CArchive is currently point in a file
I have a code in which CArchive is being used to read and write and file. Upon my investigation I found out that CArchive object changes its location when reading data from different parts of file. For example, if file structure is like there is…

fhnaseer
- 7,159
- 16
- 60
- 112
2
votes
2 answers
Visual C++, CArchive Serialize
I learn Visual C++ with Visual Studio 2010.
I tried to use Serialize function of MFC CObject.
I can't load my object with Serialize function
My code:
#include
#include
using std::cout;
using std::endl;
// CMyObject
class…

Seer
- 45
- 2
- 7
1
vote
0 answers
Pyinstaller. how to put all python code into a zip file instead of putting then in an embedded PYZ
This question is related to differential update of pyinstaller executable (modify embedded PYZ-00.pyz)
I would like to create a pyinstaller distributable, that can easily be hot fixed without wasting too much bandwidth.
The standard pyinstaller…

gelonida
- 5,327
- 2
- 23
- 41
1
vote
1 answer
Implementing MFC Serialazation for base and derived classes
I have two classes: Product and derived Juice. I need to implement MFC Serialazation for these classes.
class Product : CObject
{
protected:
DECLARE_SERIAL(Product) //IMPLEMENT_SERIAL(Product, CObject, 0) in .cpp
CString name;
int…

st_dec
- 142
- 1
- 11
1
vote
1 answer
Random Access File Format for hierarchically organised binary and text files
A Windows desktop application, whose development team I'm part of uses the legacy MFC CArchive as its application file format to serialise both text files and binary files to and from disk. The app is used to localise strings contained in these…

ericc
- 334
- 1
- 14
1
vote
1 answer
Serialize: CArchive a CImage
I am currently trying to figure out how to properly store a CImage file within a CArchive (JPEG). My current approach to this is the following (pseudo) code:
BOOL CPicture::Serialize(CArchive &ar)
{
IStream *pStream = NULL;
HRESULT hr;
…

Faceless
- 19
- 2
1
vote
1 answer
MFC Object serialization in C#
I am trying to read a binary file in C# which has been written actually using CArchive. I have done most of the part but stuck in reading an object. Instead of writing bool, int, double object has been written into…

fhnaseer
- 7,159
- 16
- 60
- 112
1
vote
0 answers
Difference between MFCArchiveFileReader and C# BinaryReader
I have some code written in MFC which writes data to a file. Now I am rewriting that code in C#. In MFC code, data is being written in file using CArchive. Now I am thinking to use BinaryReader in C# to read the data from the file.
So my question is…

fhnaseer
- 7,159
- 16
- 60
- 112
1
vote
1 answer
How do I get the real position of a section in an ELF archive file?
I want to extract a binary section fron a .a ELF archive file in Linux.
When I run objdump -h on an archive file, it lists the object files it contains, and the section headers for each section. However, the File Offset column appears to be relative…

ACyclic
- 5,904
- 6
- 26
- 28
0
votes
1 answer
Where can i find how CArchive serialized MFC C++
The point is I am trying to extract this CTime what was compressed with CArchive into QDateTime using QDataStream. I know that it is not the same, but which is why I am trying to read the raw data out. I have no control over no using CTime CArchive,…

0nePunchMan
- 13
- 1