请帮我LoaderLock ... [英] Please help me on LoaderLock ...

查看:80
本文介绍了请帮我LoaderLock ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用pinvoke从C#调用第三方dll例程。

不幸的是我获得了LoaderLock异常并且我的应用程序

停止。我已经看到它必须是

调用例程的一些不正确的行为,但是我无法修改它。


注意调用这个例程来自C ++项目并不会发出任何错误。


我该怎么办?

谢谢!

I''m trying to call a third party dll routine from C# using pinvoke.
Unfortunately I obtain a LoaderLock exception and my application
stops. I''ve seen that it must be some uncorrect behaviour of the
called routine, but I can''t modify it.

Note that calling this routine from a C++ project does not give off
any error.

How can I do?
Thank you!

推荐答案

Beorne,


没有看到通过P / Invoke调用方法的声明,

以及C ++中的原始声明,以及C#中的调用站点,

-

- Nicholas Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com


" Beorne" < ma ******* @ gmail.comwrote in message

news:11 ********************** @ y2g2000prf.googlegro ups.com ...
Beorne,

Without seeing the declaration of the method to call through P/Invoke,
as well as the original declaration in C++, as well as the call site in C#,
and any needed structures/typedefs, it''s impossible to say.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Beorne" <ma*******@gmail.comwrote in message
news:11**********************@y2g2000prf.googlegro ups.com...

我正在尝试使用pinvoke从C#调用第三方dll例程。

不幸的是我获得了一个LoaderLock异常并且我的应用程序

停止了。我已经看到它必须是

调用例程的一些不正确的行为,但是我无法修改它。


注意调用这个例程来自C ++项目并不会发出任何错误。


我该怎么办?

谢谢!
I''m trying to call a third party dll routine from C# using pinvoke.
Unfortunately I obtain a LoaderLock exception and my application
stops. I''ve seen that it must be some uncorrect behaviour of the
called routine, but I can''t modify it.

Note that calling this routine from a C++ project does not give off
any error.

How can I do?
Thank you!



" Beorne" < ma ******* @ gmail.comwrote in message

news:11 ********************** @ y2g2000prf.googlegro ups.com ...
"Beorne" <ma*******@gmail.comwrote in message
news:11**********************@y2g2000prf.googlegro ups.com...

我正在尝试使用pinvoke从C#调用第三方dll例程。

不幸的是我获得了一个LoaderLock异常并且我的应用程序

停止了。我已经看到它必须是

调用例程的一些不正确的行为,但是我无法修改它。


注意调用这个例程来自C ++项目并不会发出任何错误。


我该怎么办?

谢谢!
I''m trying to call a third party dll routine from C# using pinvoke.
Unfortunately I obtain a LoaderLock exception and my application
stops. I''ve seen that it must be some uncorrect behaviour of the
called routine, but I can''t modify it.

Note that calling this routine from a C++ project does not give off
any error.

How can I do?
Thank you!



问题出在DLL上,由于一个或另一个原因,它在加载程序锁定下调用托管代码(直接或

间接)。如果在第一次调用此DLL时发生这种情况,则表示调用是在DLL内完成的。

main。无论如何,你可以做的很少,我会建议你把它ping回第三方并要求修复DLL。注意

只在调试器中运行时抛出异常,在发布模式下运行时你的应用程序会发生什么?b / b $

Willy。


The problem is with the DLL, for one or another reason it calls (directly or
indirectly) into managed code while under the loader lock. If this happens
at the first call into this DLL, it means that call is done from within DLL
main. Anyway, there is very little you can do about this, I would suggest
you to ping that back to the third party and ask for a fix the DLL. Note
that the exception is thrown when running in the debugger only, what happens
with your application when run in release mode?

Willy.


加载程序锁定警告显示有许多第三方GUI DLL,因为它们与MS一样好。自己管理的DirectX9。它几乎是无害的。在Managed Debugging Assistants下的例外列表中关闭

off。

The loader-lock warning shows up with numerous 3rd-party GUI DLLs as
well as MS''s own managed DirectX9 stuff. It''s mostly harmless. Shut it
off in the exceptions list under Managed Debugging Assistants.


这篇关于请帮我LoaderLock ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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