Desirealize CString into System::String

G

Guest

Is there a way to read an MFC serialized class containing CStrings, ints, and
doubles using a CLR-based class? Specifically, to get CString into
System::String?

Bye the Bye, is System:: String the same as system.string (VB) ?
 
C

Carl Daniel [VC++ MVP]

Tony said:
Is there a way to read an MFC serialized class containing CStrings,
ints, and doubles using a CLR-based class? Specifically, to get
CString into System::String?'

You'll have to use MFC facilities to deserialize the data.
Bye the Bye, is System::String the same as system.string (VB) ?

Yes.

-cd
 
G

Guest

Yes, but . . . therein lies the problem.

If I make it a MFC project and then create a CLR class, it won't compile
because of the MDd switch - multi-threaded.

If I make a CLR project - it won't let me add a MFC class - they can only be
added to MFC projects.

I can't seem to get a valid reference so that "using namespace System" will
work in an MFC class.

I can't find anything that "defines" CString for a CLR class.

--
Tony H


Nishant Sivakumar said:
If you are using CString, you already have MFC included in the project.

--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com
http://blog.voidnish.com


Tony H said:
How do I add MFC support to this CLR project?
 

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