0
Reply

Serialization - C:/file_path contained an unexpected object

Davide

Davide

Dec 1 2008 8:47 AM
3.2k

Hi to everybody,
I am developping a C# web-site that needs to use a dll written in c++.

A desktop application (written in c++) shows a drag & drop objects grid. The position of the objects are saved in a layout file by using serialization (a instance of a class is saved). I must create a web page that shows the same grid.

I created a mfc dll to extract the info from the layout file and I imported it in C#. The application crashed and gave me back a SEHException.
I performed further tests (by creating a VC++ project to test the dll) and I got the following error:

C:/file_path contained an unexpected object

I used the same Serialize method as the desktop application, so I don't understand why it doesn't work.

Could anyone help me?

Thanks a lot,
Davide