4 ms·
"C calls into you" means you already have a C code base and now need to call your C# functions.
by sinhpham 9y ago
"C calls into you" means you already have a C code base and now need to call your C# functions.
- Const-me 9y agoRight, C# is OK when C code calls into it. https://stackoverflow.com/a/5235549/126995 https://stackoverflow.com/a/5235549/126995
- steveklabnik 9y agoTo be clear, I’m not saying it’s not possible. I’m saying that one less runtime is an advantage.
- int_19h 9y agoOne neat trick with .NET on Windows, is that you can actually export static methods in assemblies as unmanaged entry points. In other words, things can LoadLibrary/GetProcAddress them, and invoke them as native. C# doesn't support this out of the box, but it can be easily done by post-processing the generated assembly. There's a NuGet package for that. https://www.nuget.org/packages/UnmanagedExports https://www.nuget.org/packages/UnmanagedExports I'm not sure if any of that works on other platforms, or with .NET Core. Probably not.
- Const-me 9y agoI once tried to use that trick, for nVidia optimus integration. Didn’t work because that recompilation step broke debugger, and invalidated .PDB debug symbols.