473,785 Members | 2,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PN: Managed C++ and Unmanaged C++

Hi All,
I'm interested in the opinion of an expert or two on managed C++.net.

I've been writing cross platform C++ (win/unix) for some ETL tools I
use with clients. All the code is 'unmanaged' as I originally wrote
it in VC++ 6.

I've just completed my first managed code program. I also bought the
book VC++.NET 'Step by Step' Version 2003 and been reading that as
fast as I can. So all this 'managed code' and .net features of C++ are
new to me. I have written vb.net code and read a lot on vb.net and
ado.net.

On first reading it looks to me like:

1. VC++.NET is very closely tied to the win operating system.
2. It is not a trivial process to have unmanaged and managed code
inside the one large batch program.
3. If I was going to convert my code to C++.NET I would be re-writing
it, and then it will not work on unix.
So, it looks to me like the best thing to do is if I want to avail
myself of .net functions I should write code that is only intended to
run on windows and have all the code be 'managed code'. My other code
I should keep a separate copy to run on unix.

Or does someone out there know something about C++.net portability to
unix that I don't know about?

Thanks

Peter Nolan
www.peternolan.com
Nov 16 '05 #1
1 1419
At this time, I'd say your conclusions are basically sound, but see

http://msdn.microsoft.com/visualc/ho...a/default.aspx

at some future time, you'll likely be able to run "managed C++" on
non-Windows platforms.

-cd

Peter Nolan wrote:
Hi All,
I'm interested in the opinion of an expert or two on managed C++.net.

I've been writing cross platform C++ (win/unix) for some ETL tools I
use with clients. All the code is 'unmanaged' as I originally wrote
it in VC++ 6.

I've just completed my first managed code program. I also bought the
book VC++.NET 'Step by Step' Version 2003 and been reading that as
fast as I can. So all this 'managed code' and .net features of C++ are
new to me. I have written vb.net code and read a lot on vb.net and
ado.net.

On first reading it looks to me like:

1. VC++.NET is very closely tied to the win operating system.
2. It is not a trivial process to have unmanaged and managed code
inside the one large batch program.
3. If I was going to convert my code to C++.NET I would be re-writing
it, and then it will not work on unix.
So, it looks to me like the best thing to do is if I want to avail
myself of .net functions I should write code that is only intended to
run on windows and have all the code be 'managed code'. My other code
I should keep a separate copy to run on unix.

Or does someone out there know something about C++.net portability to
unix that I don't know about?

Thanks

Peter Nolan
www.peternolan.com

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
741
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a managed point-of-view I've noticed that: 1) for each managed and unmanaged C function (not C++ classes) I get a public managed static method (defined on a 'Global Functions' class) in the generated assembly with an export name of the form...
1
2127
by: Eric Twietmeyer | last post by:
Hello, I'm starting to investigate cs, managed c++ and interoperating with a very large unmanaged code base. We are going to use Windows Forms (written in cs) to replace our old fashioned GUI. The guts will remain in unmanaged c++. So I need to write public managed c++ wrapper classes for the couple of interfaces the unmanaged stuff needs to expose for the GUI. Questions:
5
3630
by: Chris Kiechel | last post by:
I am writing a .NET Windows application and it needs to perform DDE calls to a legacy system. I created a C++ unmanaged class that performs the actual DDE connection and communication. However, I need .NET to instantiate this object and somehow allow the this object to callback to .NET. So, my question is: 1. How can a managed class instantiate and unmanaged class?
3
3513
by: zhphust | last post by:
I want to convert a object of a managed class to a unmanaged structure that has the same member with that managed class. Can anybody tell me how i can do it? Thanks in advance. -- zhphust ------------------------------------------------------------------------
3
2782
by: Thorsten | last post by:
HI I'm a C# developer and unfortunately I have to write now some code in managed and unmanaged C++. In this area I'm Newbie and therefore please forgive me if this is a really simple question.
13
5056
by: bonk | last post by:
Hello, I am trying to create a dll that internally uses managed types but exposes a plain unmanaged interface. All the managed stuff shall be "wrapped out of sight". So that I would be able to use that dll from pure unmanaged code (for example inherit from classes in that dll). Is something like that possible. I heared something called ManWarp tried that approach. If it is possible, how can I do that. Maybe there is a small litttle
12
1631
by: doug | last post by:
I understand the basics of what managed code offers and that you open yourself up to security issues if you allow unmanaged code. We already have a decent amount of VB6 code to include COM DLLs. If we put wrappers around some of our code or leave some "asis" what makes our existing production code 'evil' just because it is now considered 'unmanaged'? It may seem like a simple niave question, but the definitions for managed and...
6
1461
by: nicolas.hilaire | last post by:
Hi all, i'm not totally clear with some concepts about managed and unmanaged code. I'm asking myself some questions : - i've a MFC app, i want to use the framework dotnet by switching to /clr compilation mode. Is my app in CLR, or only the call to the
9
3123
by: Amit Dedhia | last post by:
Hi All I have a VC++ 2005 MFC application with all classes defined as unmanaged classes. I want to write my application data in xml format. Since ADO.NET has buit in functions available for this, I want to use it. Is it possible to call Managed class functions from Unmanaged class? How to do it? I did something like this. I declared a managed class (in C++ CLI) called as MyManagedClass whose
25
3019
by: Koliber (js) | last post by:
sorry for my not perfect english i am really f&*ckin angry in this common pattern about dispose: ////////////////////////////////////////////////////////// Public class MyClass:IDisposable
0
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10155
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8979
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7502
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.