473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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 1886
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: Trep | last post by:
Hi there! I've been having a lot of difficult trying to figure out a way to convert a terminated char array to a system::string for use in Visual C++ .NET 2003. This is necessary because I...
15
by: Yifan | last post by:
Hi Does anybody know how to convert System::String* to char*? I searched the System::String class members and did not find any. Thanks Yifan
8
by: Ioannis Vranos | last post by:
In .NET (and C++/CLI) there is an overloaded String == operator for handles. That is when we do comparison of two String handles the contents of the Strings are compared instead of their addresses....
0
by: Tony H | last post by:
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...
2
by: Bae,Hyun-jik | last post by:
Hi, My managed C++ library frequently takes LPCTSTR from managed exe. Due to the fact that my library doesn't modify string buffer if its parameter type is LPCTSTR, it won't be required to copy...
3
by: Imran Aziz | last post by:
Hello All, I am getting the following error on our production server, and I dont get the same error on the development box. Unable to cast object of type 'System.Byte' to type 'System.String'. ...
1
by: Marc | last post by:
Hi! I'm working with a C# client that calls a php web service. I've created a wrapper to call the service using .NET wsdl tool (adding a web reference). The call to the server works fine, it...
24
by: Marcus Kwok | last post by:
Hello, I am working on cleaning up some code that I inherited and was wondering if there is anything wrong with my function. I am fairly proficient in standard C++ but I am pretty new to the .NET...
1
by: fade | last post by:
Good night I'm trying to convert a CString into a System::String on a MFC project, this way: CString t1("Hello, World!"); #pragma push_macro("new") #undef new System::String *s1 = new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.