How to use Unmanaged Exports in Delphi

淺唱寂寞╮ 提交于 2019-12-12 18:55:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!