Problem:
I have created a DLL in LabVIEW and have been trying to call it in Visual C++. Everytime I run my code I get a message telling me that a breakpoint is reached, although there is no breakpoint specified. Also, in the output window I get the following message.
'C:\Program Files\National Instruments\Shared\LabVIEW Run-Time\7.0\DNCompInfo.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
Solution:
This issue would most likely be found on systems running .NET Framework Version 2.0. The LoaderLock managed debugging assistant (MDA) attempts to execute managed code on a thread that holds the Microsoft Windows operating system loader lock. Any such execution is illegal because it can lead to deadlocks and the use of DLLs before they have been initialized by the operating system's loader. In order to avoid this error message, turn off the Managed Debugging Assistant (MDA) by adding the following key in Windows Registry.
Note: Modifying the Windows registry incorrectly can lead to problems. Be sure to back up the registry before making any changes.
Add the string value "MDA"="0" in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
来源:(http://blog.sina.com.cn/s/blog_5afaebf50100ag26.html) - LoaderLock错误:Managed Debugging Assistan(MDA)_戴眼镜的猪_新浪博客
出错信息为:
检测到LoaderLock,正试图在OS加载程序锁内执行托管代码,不要尝试在DllMain或映像初始化函数内运行托管代码,这样会导致应用程序挂起。
解决办法:
在"Debug"菜单下----"Exceptions"----"Managed Debugging Assistants"中勾掉"LoaderLock"
说明:
.NET2.0中增加了42种非常强大的调试助手(MDA),Loaderlock是其中之一。Loaderlock检测在一个拥有操作系统loader lock的线程上运行托管代码的情况。这样做有可能会引起死锁,并且有可能在操作系统加载器初始化DLL前被使用。虽然这样做很有必要,但在进行开发调试的时候,实在太麻烦。
注明:,NET中使用后一种方法解决,VC6中使用前一种方法解决
来源:(http://blog.sina.com.cn/s/blog_5afaebf50100ag26.html) - LoaderLock错误:Managed Debugging Assistan(MDA)_戴眼镜的猪_新浪博客
分享到:
相关推荐
JSF 2.0: Managed Beans – Classes to Represent Form Info
MS VS.NET(C++、C#、VB.NET)组件、控件和类库(Win32/64 和 WinCE/WM)的集合,以帮助开发使用某些条码打印机(Zebra)的 .NET 应用程序中的打印功能、奥尼尔等)。
状态页: :orange_square: 部分中断 该存储库包含由支持的托管网站的正常运行时间监控器和状态页面。 我们将“用作事件报告,将“用作正常运行时间监视器,并将“用作状态页面。 借助 ,您可以获得自己不受限制的...
在ASP.NET 2.0中操作数据:用Managed Code创建存储过程和用户自定义函数(上部分)
在ASP.NET 2.0中操作数据:用Managed Code创建存储过程和用户自定义函数(下部分),至此,这个系列的教程就全部发上来了,如果有什么问题请给我留言,谢谢
码头软件 大家好,感谢您访问码头软件项目( ) 什么是码头软件? 扩展坞是一个托管的Shopware 6泊坞窗映像。 在数分钟内即可在Docker本地运行和探索任何Shopware 6版本。 不再烦恼和快速燃烧!...
一个很不错的C#录音控件源码,如果觉得超值请好评。谢谢! 以下文字是帮您提供提示... 最简单的方法,在"Debug"菜单下----"Exceptions"----"Managed Debugging Assistants"中勾掉"LoaderLock") 再Debug,OK,一切搞定
资源来自pypi官网。 资源全名:openmetadata-airflow-managed-apis-0.1.0.tar.gz
开源项目-skelterjohn-wgo.zip,wgo: managed workspaces on top of the go tool
Kali Linux VMware(kali-linux-2022.2-vmware-i386.7z)文件分割成 3个 压缩包,必须集齐3个 文件后才能一起解压一起使用: Kali Linux VMware(kali-linux-2022.2-vmware-i386.part1.rar) ... ...
ODP.NET_Managed121020
managedPipelineMode: managed Pipeline Mode, Classic or Integrated, it is Classic now autoStart: true or false Rem CreateApp_IIS7.bat appName[required]: the name of the root, "Default Web Site" is the...
托管模块:Managed Module,一个标准的MS Window可移植执行体文件(32位PE32或64位PE32+) IL:Intermediate Language 中间语言,又叫托管代码(由CLR管理它的执行) 元数据:metadata,一系列特殊的数据表 程序集:...
C# 使用ManagedWifi连有密码的WIFI,功能包括WIFI扫描和连接。全部源代码,vs2008工程,可编译和测试。 WlanInterface接口的3个event都注册了,可以通过event回调函数得到当前的WIFI连接过程和最终的连接结果(连接...
ManagedProvisioning.apk
Sams - Managed DirectX 9 Kick Start
Objectives After completing this lab, you will be better able to: ... Write and Run a C# Managed Application Estimated Time to Complete This Lab 60 Minutes Computer used in this Lab WindowsCE6
深入Managed DirectX9 ,源码链接在文档最后。
lein-monolith, 用于使用monorepos的Leiningen插件 lein-monolith lein-monolith 是一个Leiningen插件,用于在monorepo中处理多个项目。 在高级,插件为你提供了一种方法:跨子项目共享配置,如 :...:managed-