Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2005

Tip: Looking for answers? Try searching our database.

Desirealize CString into System::String

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tony H - 05 Jul 2005 22:04 GMT
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) ?
Signature

Tony H

Carl Daniel [VC++ MVP] - 05 Jul 2005 22:19 GMT
> 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
Tony H - 05 Jul 2005 22:36 GMT
How do I add MFC support to this CLR project?
Signature

Tony H

> > Is there a way to read an MFC serialized class containing CStrings,
> > ints, and doubles using a CLR-based class?  Specifically, to get
[quoted text clipped - 7 lines]
>
> -cd
Nishant Sivakumar - 06 Jul 2005 08:40 GMT
If you are using CString, you already have MFC included in the project.

Signature

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

> How do I add MFC support to this CLR project?
>
[quoted text clipped - 9 lines]
>>
>> -cd
Tony H - 06 Jul 2005 15:47 GMT
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.

Signature

Tony H

> If you are using CString, you already have MFC included in the project.
>
[quoted text clipped - 11 lines]
> >>
> >> -cd

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.