Solved

C++ Unmanaged in VS 2010

Posted on 2011-03-15
8
921 Views
Last Modified: 2012-05-11
I've been talking to someone about VS 2010 and we seems to be in a fog and i would like to clarify that.

That person told me that producing C++ code in VS2010 would automatically be managed.  

Can we still produce C++ unmanaged code in VS2010 and how?  
I've seen several C++ projects type but it's not clear for me.

thanks
0
Comment
Question by:cdebel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 35136560
>>That person told me that producing C++ code in VS2010 would automatically be managed.  

Basically - RUBBISH, they don't know what they are talking about OR just misunderstood you.


For an existing project it will be unmanaged unless you deliberately change settings to make it managed.

For a new project just select the options (project template) that don't require managed code
0
 
LVL 10

Author Comment

by:cdebel
ID: 35137839
Thx Andy, but could you be more specific?

What kind of project template allow me to start a project for unmanaged code?

What are the settings i must check in the project to make an existing project unmanaged?

thanks
0
 
LVL 12

Assisted Solution

by:trinitrotoluene
trinitrotoluene earned 100 total points
ID: 35138019
>>>"ng C++ code in VS2010 would automatically be managed"

this is just not possible.

You need to understand the concepts first. Take a look at this link. It might be a bit old but should give you an idea.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 44

Accepted Solution

by:
AndyAinscow earned 400 total points
ID: 35138258
See attached picture for possibles, you might have even more available (could depend on the version of VS 2010 you have)
0009.jpg
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 35138268
>>What are the settings i must check in the project to make an existing project unmanaged?

If it was unmanaged before conversion to VS2010 format then it is still unmanaged - nothing you need to do.
0
 
LVL 44

Assisted Solution

by:AndyAinscow
AndyAinscow earned 400 total points
ID: 35138294
CLR means common runtime support.
If anything is selected then it will be adding support for .NET (=managed) code.
0010.jpg
0
 
LVL 10

Author Comment

by:cdebel
ID: 35138322
Thanks for your answer Andy.

@trinitro: thanks for the link, i'll have to read this for sure because i need to understand this subject a lot.  I want to develop some VNC-Like Server application, and i've done some tests yesterday in C# to do some BitBlt.

In my test, i've copied the whole screen, pieces by pieces (10x10 pixels block, i know that it's extreme... usually it would be something more like 50x50 or 100x100).  On my i7-950 with a kick ass graphic card, it took a fraction of second to copy the whole screen (1920x1200 resolution).  On an AMD Phenom II X6 1100T (which is still a pretty good computer), it took over 3 minutes for a smaller resolution.  

So i need to understand if writting some functions in C++ Unmanaged for the core job (to avoid slow pinvokes), mixed with C#, would do the job.
0
 
LVL 44

Assisted Solution

by:AndyAinscow
AndyAinscow earned 400 total points
ID: 35138358
>>So i need to understand if writting some functions in C++ Unmanaged for the core job (to avoid slow pinvokes), mixed with C#, would do the job.


Should do - one can call an unmanaged dll from managed code.  One could also do a mixed mode dll (mixes both managed and unmanaged code) in C++.  I think that is referred to as IJY - It Just Works.  Your C# app could then use the C++.net part which talks internally to the unmanaged C++ section.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question