单声道中的 P/Invoke [英] P/Invoke in Mono

查看:21
本文介绍了单声道中的 P/Invoke的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

What's the current status of Mono's Platform Invoke implementation on Linux and on Solaris?

解决方案

Working, usable and stable. It's well tested since quite a lot of mono's own low-level functionality has to be marshaled through it to the underlying operating system.

There are some P/Invoke extensions when compared to Microsoft .Net implementation (after all they deal with a single OS family and three architectures at most). Most notable of those would be that library mappings transform the library name to OS-specific variants (e.g. mylib.dll searches for mylib.so on Linux, mylib.dylib on OS X and so on) and take into account various other system specific conventions. There is also a DLLMap configuration extension which can be used if the default name translations are not enough. Usually it's convenient to have the same API of the binary lib exposed on different OSes, so that migrating between platforms only requires changes in the C code, not the .Net part.

这篇关于单声道中的 P/Invoke的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆