This question already has an answer here:
Closed 12 years ago.
Possible Duplicate:
Call C# dll function from Visual C++
I have a set of C# classes. Can I import these classes in a C++ project like libraries and use them in this new project?
Yes. You have to reference the dll.
You said C++/CLI, correct?
Related
This question already has answers here:
How can I call (Iron)Python code from a C# app?
(3 answers)
Closed 9 years ago.
I have a Python module, and I'd like to be able to import parts of it like classes in C#, accessing its methods and such as .NET native as possible.
How can I accomplish this using IronPython?
Take a look at this: https://wiki.python.org/moin/IntegratingPythonWithOtherLanguages
You can assemble Python modules as dynamic-link libraries and then pinvoke them in any .NET application. You can find more details here: http://msdn.microsoft.com/en-us/library/aa719104(v=vs.71).aspx
This question already has answers here:
How to use c# Dll in vc++?
(3 answers)
Closed 9 years ago.
I need to use dlls, headers and functions from a Visual C# project in a Visual C++ project.
I tried to add the dlls via "Add References" but I keep getting this error...
Caching metadata information for e:\linha_3_os179\indutron_opc\treiberdlls\elabo.devices.g_series.deviceplugin.dll
Any suggetions?
Thanks!
I would try to expose the c# code as COM objects and then use COM from c to call them
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Converting .NET App to x86 native code
is there a way to create a standard (not .NET Assembly type) 32Bit DLL for Windows using C# or Java?
And for WinCE ??
Thank you
This was referenced in one of the comments, but I wanted to post it as an answer:
For C#:
https://stackoverflow.com/a/1779505/490561
Basically, the idea is to use Mono and then Ahead Of Time Compilation. I think that'd do the trick.
For Java, the idea is similar:
https://stackoverflow.com/a/2011727/490561
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Possible to merge a DLL into a .NET EXE?
I have a C# program that uses 2 managed DLLs.
I wish that on the client computer I will not have to include both DLLs - but they will be inside the assembly itself.
Try using ILMerge.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
What are my options for C++ DLL to call a C# DLL?
Okay so there is a load of material talking about how to wrap unmanaged code written in C++ or other languages and compiled to a DLL, and making a C# wrapping to make this unmanaged code something that can be called from C# directly.
I can't seem to find any material on calling managed code, from unmanaged code. That is, given a C# library, I'd like to wrap it such that I can call it's functions from C++. It that possible?
This might be worth looking at.
You might want to expose your component to COM interop: http://msdn.microsoft.com/en-us/library/c3fd4a20.aspx