This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Using D programming language in a .NET context
Just curious, is it possible to use D from C# via P/Invoke? And if not, what other mechanisms are there to pass data between the two?
http://www.d-programming-language.org/dll.html
If you can have it in win32 dll, you should be able to P/Invoke. Never tried it though...
Related
This question already has answers here:
How can I write on another process memory?
(4 answers)
How to remote invoke another process method from C# application
(2 answers)
Closed 3 years ago.
I've been starting to do some decompiling of my C# programs and got some interesting results by editing the dlls, but is it possible to change values and call functions in a running process given that I know what the names of the variables or functions are?
Doesn't any cheat to any game do exactly that?
I mean, if I understand you correctly, there is software called
Cheat Engine which allows you to modify process variables values, inject dll's and much more.
This question already has answers here:
Is it possible to embed C code in a C# project?
(4 answers)
Closed 6 years ago.
I have C++ legacy code with functions in the form:
double func(double)
I have this as a source file - it isnt in the form of a DLL although it could be turned into one if necessary
How can I call func in my C# code (maybe over managed C++)? I heard of Marshalling and DllImport but I did not find MSDN very helpful.
You have to compile C++ code as DLL library and then DllImport is way to go.
I don't know what problem you have with it. On MSDN I found this https://msdn.microsoft.com/en-us/library/e59b22c5.aspx
And also this article: http://www.mono-project.com/docs/advanced/pinvoke/ seems to be quite useful.
This question already has answers here:
Is there a way to implement custom language features in C#?
(6 answers)
Closed 6 years ago.
I'm writing a library for personal use that greatly expands C# features, and I was wondering on something quite interesting... Is it possible to create you own keywords? For example, if, foreach, for etc.
The reason I want to do this can be found at my previous question.
No, you can not do that. Language keywords are defined in the language definition. You could probably use the open sourced parts (compilers, etc) and create your own version of them.
This question already has answers here:
Can you call a C# DLL from a C DLL?
(3 answers)
Calling C# from C
(4 answers)
Closed 9 years ago.
I am trying to use this solution. I can successfully create a C# DLL, but I have no idea how I can call it from C (no experience with this language). Can somebody help me please?
I have already seen similar questions, but they do not provide an answer to my one. I already know how I can create an unmanaged DLL with C#. The thing I do not know - how can I use it in C code?
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
C# - Is there a better alternative than this to ‘switch on type’?
1.)
http://channel9.msdn.com/forums/TechOff/411739-switch-objectGetType-/?CommentID=411995
2.)
http://blogs.msdn.com/jaredpar/archive/2008/05/16/switching-on-types.aspx
3.)
Or is there an even better way....?
Please reflect both on speed and ease of reading the code.
Of all suggested I prefer second option. Generally, I prefer double dispatch over switching on Types.