Error C0020001
来源:互联网 发布:图像识别 python 编辑:程序博客网 时间:2024/06/05 13:21
You may see an exception with this code, or an HRESULT of this value, when trying to call into managed code. This can happen if you call in before the runtime has finished initializing, or after the runtime has started shutting down.
Sometimes it’s obvious how you run into this situation. For example, if you call into managed code via a COM object or a marshaled delegate from your unmanaged DllMain while processing a DLL_PROCESS_DETACH notification, then it’s quite likely that the runtime has already shut itself down.
Other times, it’s not so obvious. In particular, you might see this exception being raised when a Windows message is being processed by a thread that is pumping messages during shutdown. If there are still some managed WinProcs registered, then a message might be dispatched to one of them. When this happens, the runtime will throw the above exception code to indicate that managed execution is no longer possible. The WinProcs should have been unregistered by code listening to the AppDomain.ProcessExit event (and the AppDomain.DomainUnload event if you have multiple AppDomains in your process). In the case of WindowsForms, this is handled for you automatically. But if you are building your own windowing system, this becomes your responsibility.
转载地址:http://blogs.msdn.com/b/cbrumme/archive/2003/04/15/51318.aspx
- Error C0020001
- 关于托管程序退出时候的"code c0020001"错误
- error
- Error
- error
- ERROR
- ERROR
- error
- Error
- Error
- error
- error
- error
- #error
- error
- error :
- Error
- #error
- 菜鸟Android之——倒计时计时器
- 解决eclipse中logcat不显示log的问题
- 我在无限互联学习记录连载1
- WCF 绑定(Binding)
- H5点击及focus效果
- Error C0020001
- 安卓实习第七天
- 【mongodb系统学习之十】mongodb查询(一)
- NSDate日期的类
- 未处理的异常: 0xC0000005: 读取位置 0x00000000 时发生访问冲突
- C语言中的预编译指令
- 耻辱!
- Log4j2使用总结
- HDOJ 5305 Friends 暴力枚举