.NET CLR InternalCall

2019-04-27 11:32发布

问题:

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.



标签: c# .net clr