在哪里初始化托管的C ++ / CLI DLL? [英] Where do I initialize a managed C++/CLI DLL?

查看:168
本文介绍了在哪里初始化托管的C ++ / CLI DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用C ++ / CLI创建DLL时,是什么,或者我应该问的是什么,相当于DllMain?

What is, or should I ask, is there, an equivalent to DllMain when creating a DLL using C++/CLI?

从这个初始化代码调用?

Are there any restrictions on what cannot be called from this initialization code?

推荐答案

Dan:关于加载器锁,C ++ / CLI的CLR延迟加载和正确初始化一个混合模式二进制,我刚在昨天发布这里的主题

Dan: With respect to the loader lock, C++/CLI's delay load of the CLR and proper initialization for a mixed mode binary, I just posted yesterday on the subject here.

或多或少,如果你有一个混合模式二进制,你不能导致任何托管代码运行,而你在 DllMain()

More or less, if you have a mixed mode binary, you must not cause any managed code to run while you are in DllMain().

这篇关于在哪里初始化托管的C ++ / CLI DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆