469,898 Members | 1,532 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Desirealize CString into System::String

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) ?
--
Tony H
Nov 17 '05 #1
8 1731
Tony H wrote:
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
Nov 17 '05 #2
Tony H wrote:
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
Nov 17 '05 #3
How do I add MFC support to this CLR project?
--
Tony H
"Carl Daniel [VC++ MVP]" wrote:
Tony H wrote:
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

Nov 17 '05 #4
How do I add MFC support to this CLR project?
--
Tony H
"Carl Daniel [VC++ MVP]" wrote:
Tony H wrote:
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

Nov 17 '05 #5
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" <To***@discussions.microsoft.com> wrote in message
news:D9**********************************@microsof t.com...
How do I add MFC support to this CLR project?
--
Tony H
"Carl Daniel [VC++ MVP]" wrote:
Tony H wrote:
> 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

Nov 17 '05 #6
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" <To***@discussions.microsoft.com> wrote in message
news:D9**********************************@microsof t.com...
How do I add MFC support to this CLR project?
--
Tony H
"Carl Daniel [VC++ MVP]" wrote:
Tony H wrote:
> 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

Nov 17 '05 #7
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" wrote:
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" <To***@discussions.microsoft.com> wrote in message
news:D9**********************************@microsof t.com...
How do I add MFC support to this CLR project?
--
Tony H
"Carl Daniel [VC++ MVP]" wrote:
Tony H wrote:
> 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


Nov 17 '05 #8
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" wrote:
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" <To***@discussions.microsoft.com> wrote in message
news:D9**********************************@microsof t.com...
How do I add MFC support to this CLR project?
--
Tony H
"Carl Daniel [VC++ MVP]" wrote:
Tony H wrote:
> 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


Nov 17 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Yifan | last post: by
8 posts views Thread by Ioannis Vranos | last post: by
reply views Thread by Tony H | last post: by
24 posts views Thread by Marcus Kwok | last post: by
1 post views Thread by fade | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.