本文介绍了导入Mono程序集或.net程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有2个DLL,1个仅用于Windows(使用Mono不支持的某些Windows特定DLL),1个用于Mono.这些DLL的方法原型都是相同的.
如果检测到Mono,则应导入LJUDMono,否则应导入LJUDWin.而且我想用DLLImport静态地做.
有什么建议?资源?
要动态地做到这一点,我发现本文通过DynamicMethod委托进行快速的后期绑定调用 [ ^ ].
Hi,
I have 2 DLLs, 1 is for Windows only (uses some Windows specific DLLs which are not supported by Mono) and 1 is for Mono. The method prototypes of those DLLs are all the same.
If Mono is detected the LJUDMono should be imported, else LJUDWin. And I''d like to do it statically with DLLImport.
Any suggestions? Resources?
To do it dynamically I found this article Fast late-bound invocation through DynamicMethod delegates[^].
推荐答案
这篇关于导入Mono程序集或.net程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!