Is there a way to host the .NET CLR runtime and register MethodImplOptions.InternalCall functions? (This is not a topic about P/Invoke)
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
SSCLI code (specifically clr\src\vm\ecall.cpp) suggests that there is no way to register InternalCall
methods, because the crucial gECClasses
table is hardcoded.
回答2:
IMetaDataImport
is your best bet, but can't really vouch for that. This seems like a specific task for C++/CLI.