RSS Feed

Call C # dll from C + +

This article allows calling a C # dll from native code (C + +).it's been a week of research on the subject, once I arrived I like the people who shared with not yet know the method.Happy reading.

Tutorial

 Calling a DLL from another C # C + +
Problem:
The C # to create DLL with a managed-coded: that is to say, it improves the dependability of a program (and to simplify the programmer's work) is a code that runs under the management of the CLR virtual machine, or another virtual machine. This term is used in contrast to unmanaged code (unmanaged code = native code), which is directly executed by the processor.
By cons, C + + to create native code, it is composed of instructions directly recognized by a processor. The native code is linked to a particular family of processors sharing the same set of instructions.
At this point, we can see that since native code, it will be difficult to called managed code unless creates an interface for communication between the two environments are calling this interface side C #, an object COM (Component Object Model).
Component Object Model, also known as ActiveX is a software component (such as DLLs) created by Microsoft. It is used in programming to allow dialogue between programs.
Example:

Project C #

 Project C++

 

Stumble
Delicious
Technorati
Twitter
Facebook

0 commentaires:

Post a Comment

 
**** ****