Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have an application of live broadcaster in C/C++ with lots of API and Graphics. now i have to make design in C#
. please help me how to integrate both. Thanks in advance
You can create a dll project in C++ and import the C++ dll into C# project. For more details, you can refer to:
http://msdn.microsoft.com/en-us/magazine/cc164123.aspx
If you want to use C++ in c# code directly, you can create a CLR(C++/CLI) project, then you can write c++ and c# code in the same project. For more details, please refer to:
http://msdn.microsoft.com/en-us/magazine/cc163852.aspx
and
http://www.codeproject.com/KB/mcpp/cppcliintro01.aspx
There are two options:
Create a C interfaces and the call methods using PInvoke
Create a C++/CLI wrapper
See this answer for more information
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have read the other topics but there is apparently no way to do it,
is it possible to use C code in C# Project without using dll ?
It depends on how you are defining "use" and "C code" but the basic answer is No. You certainly can't just include a C header file or call native C functions.
You can however write code that looks like C in C# (still using pointers and such), you just need to be in unsafe mode. Note that any C standard methods would not be available and some syntactic changes would be necessary if you were pasting in C source. This is also considered bad practice; you should be writing in normal C# 99.99999% of the time.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Is it possible to raise an event in one .dll that can be handled by another? If so, what should I be looking at.
EDIT:
I think the two dlls are running in the same process - they are both add-ins to another program. I'm limited to what I can do with add-ins, hence the need to have this communication.
I thought about writing to a local file and reading it from the other dll, but how would I know when to read it.
It's called Interprocess Communication
You probably would like to look on Pipes, or look into the IpcChannel Class, which may make things even easier. I personally didn't use any of those under C# language, but what important, is an idea and technology behind, the rest is an implementation detail.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Please, can I convert a c# DLL to vb DLL, My problem is when I try to use svg.dll written in c# with a vb Code, Single and Float Types don't much, Any Help or suggestion !
Good news: There is no need to convert! A .NET DLL is neither a C# DLL nor a VB.NET DLL, it's simply a .NET DLL. You can use DLLs created with C# in VB.NET and vice-versa.
(Apparently, you have some specific issue using a third-party DLL. Now that you know that "the language of the DLL" is not the problem, I suggest that you start a new question about that and explain the problems you are having in detail. Beware of the XY problem!)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a code which is written in c#, how can I run it in java code??
Thanks
The ikvm project is a JVM written in .net - designed to allow Java and .net interoperability.
If it is a small chunk of code, I'd recommend rewriting it.
If it is a large chunk of code, I'd recommend:
wrapping it as a command and running it using System.exec(), or
turning it into a service and making requests using HTTP, a common RPC protocol or plain sockets.
Only if neither of those approaches were technically feasible would I consider something like JNI or IKVM.
Take a look at JNBridgePro (www.jnbridge.com), which is specifically designed to tightly integrate .NET and Java code.
Disclosure: I work for JNBridge.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
There is an existing python lib which i have to instantiate in my C# code.
Which is the best possible way to do so? And how?
I am not much familiar with python, so IronPython, py2exe confused me big time.
Please Help.
You'll almost certainly be better off finding a C#/.NET alternative to that library. What is it?
If you do really need to do this your best option will be IronPython. There are a few guides to embedding IronPython code in C#, such as this one.