Solved

C++ Unmanaged in VS 2010

Posted on 2011-03-15
8
926 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
Technology Partners: 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

738 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