Solved

C++ Unmanaged in VS 2010

Posted on 2011-03-15
8
910 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
  • 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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This is about my first experience with programming Arduino.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

777 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