Desierialize MFC CArchive in C#

K

Kazinski

I have some MFC object serialized through CArchive on file.
I want to deserialize this in a C# application (or rather web service).

Since I have no control over the production of the file, it cannot be
serialized as XML.

Did anyone manage to deserialize an CArchive object in C#?
 
N

Nicholas Paldino [.NET/C# MVP]

Kazinski,

Chances are you will not be able to do this. Unless you know the format
of the MFC serialization stream, you will have to resort to de-serializing
it in C++, and then providing a managed interface to the CArchive instance.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Kazinski said:
I have some MFC object serialized through CArchive on file.
I want to deserialize this in a C# application (or rather web service).

Since I have no control over the production of the file, it cannot be
serialized as XML.

Did anyone manage to deserialize an CArchive object in C#?


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
K

Kazinski

Thanks,
I will abandon that track of thought and use the c++ classes instead.

Cheers
 
Joined
Jul 5, 2014
Messages
1
Reaction score
0
I realize that it has been some time since the last post related to reading C++ CArchive files, but I have deciphered the file structure and have written a c# class to read them.

You must however know the exact order and data types of the data written to the file (Original C++ source needed).

The file types I am able to read are as follows:
CString
CStringArray
WORD
WORDArray
DWORD
DWORDArray


If you still need help with this, I can be reached at (e-mail address removed).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top