Assume that I have some C code for a portable, non-visual library. The code relies mostly on CRT (there is no QT/DirectX/WinAPI etc. dependencies).
Is there a way I could use this code in a C# application? I know about Managed C++ and that's not an acceptable way for me.
I thought of a C/C++ to C# converter that I could use for automatic translation (I don't need a readable output, a working one is enough) or an emulator that I could use to execute compiled C/C++ code.
Do you know of anything that might help me to use existing C/C++ code from C# code?
EDIT:
P/Invoke is not an acceptable way too. As well as calling external EXE or using COM/ActiveX. I need something that will allow me to incorporate C and C# code into one managed DLL or EXE.
Existing C code is a library (.lib), not an EXE.