My question is closely related to how a DLL exports C ++ classes and common methods (C ++ language functions without C # concurrency).
I believe that you can call functions inside a extern "C"C # block by simply referencing a DLL and using DLLImport. But can you create a C ++ boilerplate type? What if a C ++ type does something crazy that is not supported in C #? Is there an RFC or related part of the C # specification ?
extern "C"
Thank...
EDIT: Now I came across P / Invoke , which should be valuable, but I'm still looking for a spec or standard regarding this.
A good way to do this is to use managed C ++ to access unmanaged C ++ and compile it into an assembly.
I believe that you can call functions inside the external "C" block from C # just by referencing the DLL.
Wrong, you should use DllImporteither the so-called PInvoke (Invoke Platform) to call your own C function from managed code. The link only works for .NET or COM compilers with automatically generated dlls .
DllImport
Using C ++ from C # becomes a real nightmare due to a name change among other things.
++ Dll , . , ComVisible, , COM.
ComVisible
C- ++ API, .
EDIT:
, :
DLL , #. , ++ , . - DLL, DLL . , DLL , #.
, . -, ++ , , PInvoke. , CRT # . factory .
, , , . API- C DLL #. ++.