473,549 Members | 2,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Converting an unmanaged C++ project to be managed

Are there any good papers/documentation around for taking
an unmanaged VC++ Project using MFC (created in VC V6) and
making it managed? My main goal here to be able to
implement new functionality in our system using C# and
being able to utilize the C# assembly from within the
existing VC++ code.

Can you mix and match like this? For example, could I
have CObject derived object create a C# assembly that
creates an OLE DB recordset and stores properties into the
CObject-derived object?

Thanks for your help.

Regards,

-Rob
Nov 16 '05 #1
12 7478
> Are there any good papers/documentation around for taking
an unmanaged VC++ Project using MFC (created in VC V6) and
making it managed?
http://msdn.microsoft.com/library/en...plications.asp
http://msdn.microsoft.com/library/en...art1_Start.asp
in VS.NET install dir, Vc7\migration_g uide.doc

It's just a matter of using /clr switch and you get access to your C#
assembly and MC++ syntax.
My main goal here to be able to
implement new functionality in our system using C# and
being able to utilize the C# assembly from within the
existing VC++ code.
Can you mix and match like this?


Yes
Nov 16 '05 #2
Thanks for your response.

I looked at the document and it states to set the /clr
option. When I do this I get a build error:
"cl : Command line error D2016 : '/RTC1' and '/clr'
command-line options are incompatible"

I can't seem to find which setting to uncheck to disable
this setting.

Also, once I do this, what will I have to distribute with
my app for the .NET runtime?

Regards,

-Rob

-----Original Message-----
Are there any good papers/documentation around for taking an unmanaged VC++ Project using MFC (created in VC V6) and making it managed?
http://msdn.microsoft.com/library/en-

us/vcmex/html/vcoriMigratingY ourApplications .asphttp://msdn.microsoft.com/library/en- us/vcmxspec/html/vcManExMigratio nGuidePart1_Sta rt.aspin VS.NET install dir, Vc7\migration_g uide.doc

It's just a matter of using /clr switch and you get access to your C#assembly and MC++ syntax.
My main goal here to be able to
implement new functionality in our system using C# and
being able to utilize the C# assembly from within the
existing VC++ code.
Can you mix and match like this?


Yes
.

Nov 16 '05 #3
/RTC1 is "Basic runtime checks" setting under Code Generation.

You either have to direct users to windows update site to get .net redist
or
http://www.microsoft.com/downloads/d...7-034D1E7CF3A3

"Rob C" <an*******@disc ussions.microso ft.com> wrote in message
news:02******** *************** *****@phx.gbl.. .
Thanks for your response.

I looked at the document and it states to set the /clr
option. When I do this I get a build error:
"cl : Command line error D2016 : '/RTC1' and '/clr'
command-line options are incompatible"

I can't seem to find which setting to uncheck to disable
this setting.

Also, once I do this, what will I have to distribute with
my app for the .NET runtime?

Regards,

-Rob

-----Original Message-----
Are there any good papers/documentation around for taking an unmanaged VC++ Project using MFC (created in VC V6) and making it managed?


http://msdn.microsoft.com/library/en-

us/vcmex/html/vcoriMigratingY ourApplications .asp
http://msdn.microsoft.com/library/en-

us/vcmxspec/html/vcManExMigratio nGuidePart1_Sta rt.asp
in VS.NET install dir, Vc7\migration_g uide.doc

It's just a matter of using /clr switch and you get

access to your C#
assembly and MC++ syntax.
My main goal here to be able to
implement new functionality in our system using C# and
being able to utilize the C# assembly from within the
existing VC++ code.
Can you mix and match like this?


Yes
.



Nov 16 '05 #4
/RTC1 is "Basic runtime checks" setting under Code Generation.

You either have to direct users to windows update site to get .net redist
or
http://www.microsoft.com/downloads/d...7-034D1E7CF3A3

"Rob C" <an*******@disc ussions.microso ft.com> wrote in message
news:02******** *************** *****@phx.gbl.. .
Thanks for your response.

I looked at the document and it states to set the /clr
option. When I do this I get a build error:
"cl : Command line error D2016 : '/RTC1' and '/clr'
command-line options are incompatible"

I can't seem to find which setting to uncheck to disable
this setting.

Also, once I do this, what will I have to distribute with
my app for the .NET runtime?

Regards,

-Rob

-----Original Message-----
Are there any good papers/documentation around for taking an unmanaged VC++ Project using MFC (created in VC V6) and making it managed?


http://msdn.microsoft.com/library/en-

us/vcmex/html/vcoriMigratingY ourApplications .asp
http://msdn.microsoft.com/library/en-

us/vcmxspec/html/vcManExMigratio nGuidePart1_Sta rt.asp
in VS.NET install dir, Vc7\migration_g uide.doc

It's just a matter of using /clr switch and you get

access to your C#
assembly and MC++ syntax.
My main goal here to be able to
implement new functionality in our system using C# and
being able to utilize the C# assembly from within the
existing VC++ code.
Can you mix and match like this?


Yes
.



Nov 16 '05 #5
/RTC1 is "Basic runtime checks" setting under Code Generation.

You either have to direct users to windows update site to get .net redist
or
http://www.microsoft.com/downloads/d...7-034D1E7CF3A3

"Rob C" <an*******@disc ussions.microso ft.com> wrote in message
news:02******** *************** *****@phx.gbl.. .
Thanks for your response.

I looked at the document and it states to set the /clr
option. When I do this I get a build error:
"cl : Command line error D2016 : '/RTC1' and '/clr'
command-line options are incompatible"

I can't seem to find which setting to uncheck to disable
this setting.

Also, once I do this, what will I have to distribute with
my app for the .NET runtime?

Regards,

-Rob

-----Original Message-----
Are there any good papers/documentation around for taking an unmanaged VC++ Project using MFC (created in VC V6) and making it managed?


http://msdn.microsoft.com/library/en-

us/vcmex/html/vcoriMigratingY ourApplications .asp
http://msdn.microsoft.com/library/en-

us/vcmxspec/html/vcManExMigratio nGuidePart1_Sta rt.asp
in VS.NET install dir, Vc7\migration_g uide.doc

It's just a matter of using /clr switch and you get

access to your C#
assembly and MC++ syntax.
My main goal here to be able to
implement new functionality in our system using C# and
being able to utilize the C# assembly from within the
existing VC++ code.
Can you mix and match like this?


Yes
.


Nov 16 '05 #6
Under Project Properties/Code Generation, it does not let
me deselect this option. The possible values
are "default", "Stack Frames (/RTCs)", "Uninitiali zed
Variables (/RTCu)" and "Both (/RTC1, equiv. to /RTCsu)".
All of these selections generate that same error. Is
there a different porperty to set that turns off this
option?

Regards,

-Rob
-----Original Message-----
/RTC1 is "Basic runtime checks" setting under Code Generation.
You either have to direct users to windows update site to get .net redistor
http://www.microsoft.com/downloads/details.aspx? FamilyId=262D25 E3-F589-4842-8157-034D1E7CF3A3
"Rob C" <an*******@disc ussions.microso ft.com> wrote in messagenews:02******* *************** ******@phx.gbl. ..
Thanks for your response.

I looked at the document and it states to set the /clr
option. When I do this I get a build error:
"cl : Command line error D2016 : '/RTC1' and '/clr'
command-line options are incompatible"

I can't seem to find which setting to uncheck to disable
this setting.

Also, once I do this, what will I have to distribute with my app for the .NET runtime?

Regards,

-Rob

>-----Original Message-----
>> Are there any good papers/documentation around for

taking
>> an unmanaged VC++ Project using MFC (created in VC V6)
and
>> making it managed?
>
>http://msdn.microsoft.com/library/en-

us/vcmex/html/vcoriMigratingY ourApplications .asp
>http://msdn.microsoft.com/library/en-

us/vcmxspec/html/vcManExMigratio nGuidePart1_Sta rt.asp
>in VS.NET install dir, Vc7\migration_g uide.doc
>
>It's just a matter of using /clr switch and you get

access to your C#
>assembly and MC++ syntax.
>
>>My main goal here to be able to
>> implement new functionality in our system using C#

and >> being able to utilize the C# assembly from within the
>> existing VC++ code.
>> Can you mix and match like this?
>
>Yes
>
>
>.
>



.

Nov 16 '05 #7
use Default

"Rob C" <an*******@disc ussions.microso ft.com> wrote in message
news:05******** *************** *****@phx.gbl.. .
Under Project Properties/Code Generation, it does not let
me deselect this option. The possible values
are "default", "Stack Frames (/RTCs)", "Uninitiali zed
Variables (/RTCu)" and "Both (/RTC1, equiv. to /RTCsu)".
All of these selections generate that same error. Is
there a different porperty to set that turns off this
option?

Regards,

-Rob
-----Original Message-----
/RTC1 is "Basic runtime checks" setting under Code

Generation.

You either have to direct users to windows update site to

get .net redist
or
http://www.microsoft.com/downloads/details.aspx?

FamilyId=262D25 E3-F589-4842-8157-034D1E7CF3A3

"Rob C" <an*******@disc ussions.microso ft.com> wrote in

message
news:02******* *************** ******@phx.gbl. ..
Thanks for your response.

I looked at the document and it states to set the /clr
option. When I do this I get a build error:
"cl : Command line error D2016 : '/RTC1' and '/clr'
command-line options are incompatible"

I can't seem to find which setting to uncheck to disable
this setting.

Also, once I do this, what will I have to distribute with my app for the .NET runtime?

Regards,

-Rob
>-----Original Message-----
>> Are there any good papers/documentation around for
taking
>> an unmanaged VC++ Project using MFC (created in VC V6) and
>> making it managed?
>
>http://msdn.microsoft.com/library/en-
us/vcmex/html/vcoriMigratingY ourApplications .asp
>http://msdn.microsoft.com/library/en-
us/vcmxspec/html/vcManExMigratio nGuidePart1_Sta rt.asp
>in VS.NET install dir, Vc7\migration_g uide.doc
>
>It's just a matter of using /clr switch and you get
access to your C#
>assembly and MC++ syntax.
>
>>My main goal here to be able to
>> implement new functionality in our system using C# and >> being able to utilize the C# assembly from within the
>> existing VC++ code.
>> Can you mix and match like this?
>
>Yes
>
>
>.
>



.

Nov 16 '05 #8
use Default

"Rob C" <an*******@disc ussions.microso ft.com> wrote in message
news:05******** *************** *****@phx.gbl.. .
Under Project Properties/Code Generation, it does not let
me deselect this option. The possible values
are "default", "Stack Frames (/RTCs)", "Uninitiali zed
Variables (/RTCu)" and "Both (/RTC1, equiv. to /RTCsu)".
All of these selections generate that same error. Is
there a different porperty to set that turns off this
option?

Regards,

-Rob
-----Original Message-----
/RTC1 is "Basic runtime checks" setting under Code

Generation.

You either have to direct users to windows update site to

get .net redist
or
http://www.microsoft.com/downloads/details.aspx?

FamilyId=262D25 E3-F589-4842-8157-034D1E7CF3A3

"Rob C" <an*******@disc ussions.microso ft.com> wrote in

message
news:02******* *************** ******@phx.gbl. ..
Thanks for your response.

I looked at the document and it states to set the /clr
option. When I do this I get a build error:
"cl : Command line error D2016 : '/RTC1' and '/clr'
command-line options are incompatible"

I can't seem to find which setting to uncheck to disable
this setting.

Also, once I do this, what will I have to distribute with my app for the .NET runtime?

Regards,

-Rob
>-----Original Message-----
>> Are there any good papers/documentation around for
taking
>> an unmanaged VC++ Project using MFC (created in VC V6) and
>> making it managed?
>
>http://msdn.microsoft.com/library/en-
us/vcmex/html/vcoriMigratingY ourApplications .asp
>http://msdn.microsoft.com/library/en-
us/vcmxspec/html/vcManExMigratio nGuidePart1_Sta rt.asp
>in VS.NET install dir, Vc7\migration_g uide.doc
>
>It's just a matter of using /clr switch and you get
access to your C#
>assembly and MC++ syntax.
>
>>My main goal here to be able to
>> implement new functionality in our system using C# and >> being able to utilize the C# assembly from within the
>> existing VC++ code.
>> Can you mix and match like this?
>
>Yes
>
>
>.
>



.

Nov 16 '05 #9
It actually was set to default to begin with the first
time I got the error. I tried selecting each one and
rebuilding but to no avail.

Any other thoughts?

Thanks again for your help.

Regards,

-Rob
-----Original Message-----
use Default

"Rob C" <an*******@disc ussions.microso ft.com> wrote in messagenews:05******* *************** ******@phx.gbl. ..
Under Project Properties/Code Generation, it does not let me deselect this option. The possible values
are "default", "Stack Frames (/RTCs)", "Uninitiali zed
Variables (/RTCu)" and "Both (/RTC1, equiv. to /RTCsu)".
All of these selections generate that same error. Is
there a different porperty to set that turns off this
option?

Regards,

-Rob
>-----Original Message-----
>/RTC1 is "Basic runtime checks" setting under Code

Generation.
>
>You either have to direct users to windows update site to
get .net redist
>or
>http://www.microsoft.com/downloads/details.aspx?

FamilyId=262D25 E3-F589-4842-8157-034D1E7CF3A3
>
>"Rob C" <an*******@disc ussions.microso ft.com> wrote in

message
>news:02******* *************** ******@phx.gbl. ..
>> Thanks for your response.
>>
>> I looked at the document and it states to set

the /clr >> option. When I do this I get a build error:
>> "cl : Command line error D2016 : '/RTC1' and '/clr'
>> command-line options are incompatible"
>>
>> I can't seem to find which setting to uncheck to disable >> this setting.
>>
>> Also, once I do this, what will I have to distribute

with
>> my app for the .NET runtime?
>>
>> Regards,
>>
>> -Rob
>>
>>
>> >-----Original Message-----
>> >> Are there any good papers/documentation around for
>> taking
>> >> an unmanaged VC++ Project using MFC (created in VC

V6)
>> and
>> >> making it managed?
>> >
>> >http://msdn.microsoft.com/library/en-
>> us/vcmex/html/vcoriMigratingY ourApplications .asp
>> >http://msdn.microsoft.com/library/en-
>> us/vcmxspec/html/vcManExMigratio nGuidePart1_Sta rt.asp
>> >in VS.NET install dir, Vc7\migration_g uide.doc
>> >
>> >It's just a matter of using /clr switch and you get
>> access to your C#
>> >assembly and MC++ syntax.
>> >
>> >>My main goal here to be able to
>> >> implement new functionality in our system using C#

and
>> >> being able to utilize the C# assembly from within the >> >> existing VC++ code.
>> >> Can you mix and match like this?
>> >
>> >Yes
>> >
>> >
>> >.
>> >
>
>
>
>
>.
>

.

Nov 16 '05 #10

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...
1
4077
by: Sin | last post by:
Hello everyone, I'm currently trying to migrate a MSVC6 project to .NET... The straight conversion (ie : unmanaged) was extremely straightforward. Now I'm trying to compile and hopefully run the project as managed to estimate the kind of performance difference there will be for the kind of applications we do here. The project is composed...
0
1661
by: Edward Diener | last post by:
I have some questions about the instructions for creating a mixed mode DLL in the MSDN topic "Converting Managed Extensions for C++ Projects from Pure Intermediate Language to Mixed Mode" in the "Managed Extensions for C++ Reference". 1) The first instruction in converting to mixed mode is to link with /NOENTRY. This occurs despite the fact...
9
2575
by: Edward Diener | last post by:
I received no answers about this the first time I posted, so I will try again. My inability to decipher an MSDN topic may find others who have the same inability and someone who can decipher and explain it. I have some questions about the instructions for creating a mixed mode DLL in the MSDN topic "Converting Managed Extensions for C++...
4
7168
by: repstat | last post by:
Hi I have a project which is going to be doing some string manipulation which needs to be pretty fast. The user interface is going to be written in C#. I am going to write the string handling functions in a C++ DLL. My first question is, if I insert a C++ project into my C# solution, how will VS.NET know that I want it to be unmanaged code?...
2
2032
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 afterwards 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...
13
5023
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...
3
2846
by: Pixel.to.life | last post by:
Hi, Gurus, I recently attempted to build a .Net forms application, that links with old style unmanaged C++ static libs. Of course I had to recompile the static lib projects to link properly with the managed application. My questions are two fold: The managed project uses /clr and /MDd (in debug) options. The
2
12349
by: Jon Slaughter | last post by:
How difficult is it for one to integrate unmanaged C++ into C#? I know for functions one can use DLLimport but how does one go about doing it for classes? Do I have to completely reimplement the classes in managed C++ as a wrapper to the unmanaged C++ classes or is there an easier way? Essentially what I have done is written a C++ kernel...
0
7477
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...
0
7991
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...
0
7838
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6084
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...
0
3524
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...
0
3503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1971
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1084
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
790
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...

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.