Is there a way to host the .NET CLR runtime and register the MethodImplOptions.InternalCall functions? (This is not a topic about P / Invoke)
The SSCLI code (in particular, clr \ src \ vm \ ecall.cpp) assumes that it is not possible to register InternalCall methods because the critical gECClasses table gECClasses hard-coded.
InternalCall
gECClasses
IMetaDataImport is your best bet, but really can't vouch for it. This seems like a specific task for C ++ / CLI.
IMetaDataImport