View Single Post
  #1 (permalink)  
Old February 16th, 2007, 01:47 PM
Dan6 Dan6 is offline
Authorized User
 
Join Date: Feb 2007
Location: , , United Kingdom.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch 18 - Deserialisation problem using dll classes

I was just wondering if anyone else has come across the same deserialisation problem I've found when using the element classes in the dll file. Sketcher seems to work fine with the dll file and will correctly serialise a document. However, when it comes to reading a file back into the program, it claims "Unexpected file format" and looking at the debug trace it's not able to load the appropriate class. It throws "CArchive exception: badClass".

Looking at the list of loaded modules shows that the dll file is amongst them and the program has no problem drawing any of these elements, or serialising them, so I can't understand why it can't seem to find the class.

Looking around on the net I came across this on the Microsoft website, which is exactly the problem I'm having:

http://support.microsoft.com/kb/322621

However, this article was last reviewed in 2005 when it applied to Visual Studio.NET 2002. So the fix for this bug, which was included in service pack 1 for that version, should surely be included in my standard version of Visual Studio 2005 shouldn't it? I've installed SP1 for my version of the program so it should be as up to date as it can be. But the problem still remains.

Has anyone else using Visual Studio 2005 had this problem?