问题
I'm making a project in C# and I want to use Unmanaged Exports and later to use it in Delphi. So can anyone explain me, how does Unmanaged Exports works, then how to use/import in Delphi. I'm using Visual Studio 2010 Express, on Windows 7 64 bit
回答1:
The best description I've heard for unmanaged exports is "reverse PInvoke". These are limited to scalar types, but let you consume managed assemblies from native code without the overhead of COM Interop.
I haven't tried it, but you can do this in C# with a little tweaking.
As an alternative, Delphi Prism supports this functionality out of the box.
回答2:
Brian Long wrote the classic article on Inverse P/Invoke to call managed C# code from Delphi Win32.
I'm not sure I'd use this kind of technology, but it is possible :-)
--jeroen
来源:https://stackoverflow.com/questions/3140656/how-to-use-unmanaged-exports-in-delphi