Re: Suggestions on C++ (VS6) to C# Conversion

Peter Osucha <[email protected]> Tue, 15 May 2007 16:42:17 -0400
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <[email protected]>
Thanks Peter.  After looking through the code, it doesn't appear to use
lots of MFC classes.  It makes heavy use of the 4 com ports on the SBC
it is a part of as well as writing and reading to the SBC General
Purpose IO.  Perhaps C# (the code was written using VS2003, not VS2005)
did not allow for easily writing to the general purpose IO - perhaps
not.

There isn't a lot of code here.  I might be able to slog through it
without too much difficulty (then I can but you guys about Managed C++,
eh? :-)).

Peter

-----Original Message-----
From: Discussion relating to the specifics of the C# and Managed C++
languages [mailto:[email protected]] On Behalf Of Peter
Ritchie
Sent: Tuesday, May 15, 2007 2:56 PM
To: [email protected]
Subject: Re: [DOTNET-CX] Suggestions on C++ (VS6) to C# Conversion

If it's using lots of MFC classes (besides the UI classes) it's probaly
going to mostly be a re-write (which is likely).  The MFC classes don't
line-up well with .NET classes (for many reasons).

If you've got some DLLs or decoupled classes that can exist with MFC you
might put those all into a C++ class library in C++ 200x.  With IJW or
C++
Interop you can compile native C++ into a managed assembly.  You'll have
to create managed classes to wrap that native code, but that's usually
pretty straight foward.  This will require that that assembly have
native
code permissions, if you're in a high-security environment.

On Tue, 15 May 2007 11:04:13 -0400, Peter Osucha
<[email protected]> wrote:

>I am not very proficient in C++ - particularly that from Visual Studio
>6.  I have some C++ MFC projects that I need to support and maintain
and
>I'd like to turn them into C# projects as quickly as I can.  They are
>fairly simple projects (in functionality, at least)...  there is an
>interface to handle and respond to TCP requests and then some code to
>independently handle COM ports.
>
>
>
>As I mentioned, I am not proficient in C++.  What might be the easiest
>path to move this code (total rewrite, hopefully a somewhat automated
>way to at least attempt a conversion)?

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This list is hosted by DevelopMentor=AE  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com