ICLRMetaHost,ICLRRuntimeInfo,ICLRRuntimeHost,CLSID_CLRMetaHost,IID_ICLRMetaHost,IID_ICLRRuntimeInfo,CLSID_CLRRuntimeHost,IID_ICLRRuntimeHost
您是否有任何想法或链接到某些代码,这些代码在linux上使用CoreCLR从C调用C#?
我只对linux上的CoreCLR感兴趣(不是Mono!).
解决方法 好的,我发现为了获得C#函数的委托,你必须使用coreCLR提供的这三个函数:// this one first,to initialize coreCLRint (coreclrInitializefunction)( const char* exePath,const char* appDomainFrIEndlyname,int propertyCount,const char** propertyKeys,const char** propertyValues,voID** hostHandle,unsigned int* domainID);// this one to get delegate to your C# functionint (coreclrCreateDelegateFunction)( voID* hostHandle,unsigned int domainID,const char* entryPointAssemblyname,const char* entryPointTypename,const char* entryPointMethodname,voID** delegate);// this one on the end,to close coreCLRint (coreclrshutdownFunction)( voID* hostHandle,unsigned int domainID);
这是我调用C#函数的示例代码,它调用C对象上的C方法:https://github.com/Marqin/simpleCoreCLRHost
总结以上是内存溢出为你收集整理的在Linux上使用CoreCLR从C调用C#方法全部内容,希望文章能够帮你解决在Linux上使用CoreCLR从C调用C#方法所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)