Click here to Skip to main content
15,897,273 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: conver "System::String ^" to std::String [modified] Pin
Mark Salsbery28-May-09 7:51
Mark Salsbery28-May-09 7:51 
GeneralRe: conver "System::String ^" to std::String Pin
tecnico.antonio28-May-09 23:33
tecnico.antonio28-May-09 23:33 
GeneralRe: conver "System::String ^" to std::String Pin
Mark Salsbery29-May-09 5:57
Mark Salsbery29-May-09 5:57 
QuestionHow to hook the ReadFile API like FileMon does. Pin
deadlyabbas28-May-09 1:04
deadlyabbas28-May-09 1:04 
QuestionManaged C++/CLI calling native C++ class: GC? Wrapper recommended? Pin
Unbe Kant22-May-09 13:45
Unbe Kant22-May-09 13:45 
AnswerRe: Managed C++/CLI calling native C++ class: GC? Wrapper recommended? Pin
N a v a n e e t h23-May-09 5:27
N a v a n e e t h23-May-09 5:27 
QuestionUse native C++-DLLs with managed C++ or C#? Pin
Unbe Kant22-May-09 13:26
Unbe Kant22-May-09 13:26 
AnswerRe: Use native C++-DLLs with managed C++ or C#? Pin
N a v a n e e t h23-May-09 5:53
N a v a n e e t h23-May-09 5:53 
Unbe Kant wrote:
Performance critical tasks: native C++ class library


Looks like you are doing premature optimization. AFAIK, Managed code can be faster than native C++ code sometimes as JIT compiler does optimizations(specific for the running machine) on the IL. C++ code is compiled, but not optimized for the machine where it will be running. Having said that, specific optimizations on C++ can improve the performance drastically and managed code can be nowhere near to that. So choose the decision carefully as communication between unmanaged-managed may be performance costly.

As I said, when using managed languages, try to use managed code whenever possible.

Unbe Kant wrote:
In such a "from scratch" project, where is the benefit in using managed C++ instead of C#


I think there is no benefits if you are writing everything as managed code. If you are mixing managed and unmanaged code, C++/CLI can take advantage. C++ interop is more efficient than p-invoke. So that unmanaged-managed communication can be better. Other advantage I felt is, C++/CLI supports generics like C# and it also supports C++ templates for managed classes. Here[^] is an explanation for why C++/CLI supports both.

When you do mixed mode compilation in C++/CLI, the generated assemblies are tough to disassemble with tools like reflector. I have read in the C++/CLI team blog saying that it produces more optimized IL than any other CLI languages.

Smile | :)


GeneralRe: Use native C++-DLLs with managed C++ or C#? Pin
Unbe Kant23-May-09 8:09
Unbe Kant23-May-09 8:09 
AnswerRe: Use native C++-DLLs with managed C++ or C#? Pin
Luc Pattyn23-May-09 6:17
sitebuilderLuc Pattyn23-May-09 6:17 
GeneralRe: Use native C++-DLLs with managed C++ or C#? Pin
Unbe Kant23-May-09 8:24
Unbe Kant23-May-09 8:24 
GeneralRe: Use native C++-DLLs with managed C++ or C#? Pin
Luc Pattyn23-May-09 8:57
sitebuilderLuc Pattyn23-May-09 8:57 
GeneralRe: Use native C++-DLLs with managed C++ or C#? Pin
Unbe Kant23-May-09 12:07
Unbe Kant23-May-09 12:07 
GeneralRe: Use native C++-DLLs with managed C++ or C#? Pin
Luc Pattyn23-May-09 12:35
sitebuilderLuc Pattyn23-May-09 12:35 
GeneralRe: Use native C++-DLLs with managed C++ or C#? Pin
Unbe Kant23-May-09 13:22
Unbe Kant23-May-09 13:22 
GeneralRe: Use native C++-DLLs with managed C++ or C#? Pin
led mike27-May-09 5:01
led mike27-May-09 5:01 
GeneralRe: Use native C++-DLLs with managed C++ or C#? Pin
Luc Pattyn27-May-09 5:50
sitebuilderLuc Pattyn27-May-09 5:50 
GeneralRe: Use native C++-DLLs with managed C++ or C#? Pin
N a v a n e e t h27-May-09 17:22
N a v a n e e t h27-May-09 17:22 
QuestionResizing of Labels in Controls Pin
cherrymotion21-May-09 21:23
cherrymotion21-May-09 21:23 
AnswerRe: Resizing of Labels in Controls Pin
N a v a n e e t h21-May-09 21:54
N a v a n e e t h21-May-09 21:54 
GeneralRe: Resizing of Labels in Controls Pin
cherrymotion21-May-09 22:16
cherrymotion21-May-09 22:16 
QuestionRe: Resizing of Labels in Controls Pin
led mike22-May-09 4:26
led mike22-May-09 4:26 
AnswerRe: Resizing of Labels in Controls Pin
cherrymotion22-May-09 8:25
cherrymotion22-May-09 8:25 
GeneralRe: Resizing of Labels in Controls [modified] Pin
Luc Pattyn22-May-09 9:40
sitebuilderLuc Pattyn22-May-09 9:40 
QuestionSending events to main window of another process Pin
parth_patel21-May-09 5:34
parth_patel21-May-09 5:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.