472,123 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

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 7386
> 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_guide.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/vcoriMigratingYourApplications.asphttp://msdn.microsoft.com/library/en- us/vcmxspec/html/vcManExMigrationGuidePart1_Start.aspin VS.NET install dir, Vc7\migration_guide.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*******@discussions.microsoft.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/vcoriMigratingYourApplications.asp
http://msdn.microsoft.com/library/en-

us/vcmxspec/html/vcManExMigrationGuidePart1_Start.asp
in VS.NET install dir, Vc7\migration_guide.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*******@discussions.microsoft.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/vcoriMigratingYourApplications.asp
http://msdn.microsoft.com/library/en-

us/vcmxspec/html/vcManExMigrationGuidePart1_Start.asp
in VS.NET install dir, Vc7\migration_guide.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*******@discussions.microsoft.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/vcoriMigratingYourApplications.asp
http://msdn.microsoft.com/library/en-

us/vcmxspec/html/vcManExMigrationGuidePart1_Start.asp
in VS.NET install dir, Vc7\migration_guide.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)", "Uninitialized
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=262D25E3-F589-4842-8157-034D1E7CF3A3
"Rob C" <an*******@discussions.microsoft.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/vcoriMigratingYourApplications.asp
>http://msdn.microsoft.com/library/en-

us/vcmxspec/html/vcManExMigrationGuidePart1_Start.asp
>in VS.NET install dir, Vc7\migration_guide.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*******@discussions.microsoft.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)", "Uninitialized
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=262D25E3-F589-4842-8157-034D1E7CF3A3

"Rob C" <an*******@discussions.microsoft.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/vcoriMigratingYourApplications.asp
>http://msdn.microsoft.com/library/en-
us/vcmxspec/html/vcManExMigrationGuidePart1_Start.asp
>in VS.NET install dir, Vc7\migration_guide.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*******@discussions.microsoft.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)", "Uninitialized
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=262D25E3-F589-4842-8157-034D1E7CF3A3

"Rob C" <an*******@discussions.microsoft.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/vcoriMigratingYourApplications.asp
>http://msdn.microsoft.com/library/en-
us/vcmxspec/html/vcManExMigrationGuidePart1_Start.asp
>in VS.NET install dir, Vc7\migration_guide.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*******@discussions.microsoft.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)", "Uninitialized
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=262D25E3-F589-4842-8157-034D1E7CF3A3
>
>"Rob C" <an*******@discussions.microsoft.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/vcoriMigratingYourApplications.asp
>> >http://msdn.microsoft.com/library/en-
>> us/vcmxspec/html/vcManExMigrationGuidePart1_Start.asp
>> >in VS.NET install dir, Vc7\migration_guide.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
Don't know. If this was vc6 project converted to VS.NET then maybe
conversion failed somewhere.

"Rob C" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
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*******@discussions.microsoft.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)", "Uninitialized
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=262D25E3-F589-4842-8157-034D1E7CF3A3
>
>"Rob C" <an*******@discussions.microsoft.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/vcoriMigratingYourApplications.asp
>> >http://msdn.microsoft.com/library/en-
>> us/vcmxspec/html/vcManExMigrationGuidePart1_Start.asp
>> >in VS.NET install dir, Vc7\migration_guide.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 #11
This is strange... I was able to build the project as a
Release Build with the setting set to default but I still
get the error when I try to build it in Debug.

I guess its time to cash in one of my support incidents at
Microsoft.

Thanks again for your help.

Regards,

-Rob
-----Original Message-----
Don't know. If this was vc6 project converted to VS.NET then maybeconversion failed somewhere.

"Rob C" <an*******@discussions.microsoft.com> wrote in messagenews:06****************************@phx.gbl...
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*******@discussions.microsoft.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)", "Uninitialized
>> 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=262D25E3-F589-4842-8157-034D1E7CF3A3
>> >
>> >"Rob C" <an*******@discussions.microsoft.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/vcoriMigratingYourApplications.asp
>> >> >http://msdn.microsoft.com/library/en-
>> >> us/vcmxspec/html/vcManExMigrationGuidePart1_Start.asp >> >> >in VS.NET install dir, Vc7\migration_guide.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 #12
No just do this:
Open .vcproj file from your project's directory. It's in xml format.
Find
<Configuration Name="Debug.... >
<Tool ... BasicRuntimeChecks="3" ... />

Change it to 0.
"Rob C" <an*******@discussions.microsoft.com> wrote in message
news:0d****************************@phx.gbl...
This is strange... I was able to build the project as a
Release Build with the setting set to default but I still
get the error when I try to build it in Debug.

I guess its time to cash in one of my support incidents at
Microsoft.

Thanks again for your help.

Regards,

-Rob
-----Original Message-----
Don't know. If this was vc6 project converted to VS.NET

then maybe
conversion failed somewhere.

"Rob C" <an*******@discussions.microsoft.com> wrote in

message
news:06****************************@phx.gbl...
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*******@discussions.microsoft.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)", "Uninitialized
>> 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=262D25E3-F589-4842-8157-034D1E7CF3A3
>> >
>> >"Rob C" <an*******@discussions.microsoft.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/vcoriMigratingYourApplications.asp
>> >> >http://msdn.microsoft.com/library/en-
>> >> us/vcmxspec/html/vcManExMigrationGuidePart1_Start.asp >> >> >in VS.NET install dir, Vc7\migration_guide.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 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Edward Diener | last post: by
4 posts views Thread by repstat | last post: by
2 posts views Thread by Jon Slaughter | last post: by
reply views Thread by leo001 | last post: by

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.