依赖性walker msvcr80d.dll缺少coredll.dll和dwmapi.dll [英] Dependency walker msvcr80d.dll missing coredll.dll and dwmapi.dll

查看:88
本文介绍了依赖性walker msvcr80d.dll缺少coredll.dll和dwmapi.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经完成了将我们公司的C ++托管代码

应用程序之一迁移到VS2005。我现在正在尝试运行该应用程序,但是当访问从我们的实用程序dll
正确导出的对象时,

似乎是个问题。 dll用MFC编写,带有C ++部分

托管代码。


dll以与任何VS2005解决方案向导相同的方式导出其对象

驱动win32 dll基本代码,使用模型:__ declspec(dllexport)。


实际上当我使用DepedencyWalker应用程序进入dll时,导出

很容易看到。


我在dll上实现

DepedencyWalker应用程序之前将msvcr80d.dll复制到dll的文件夹中。 br />

DepedencyWalker抱怨msvcr80d.dll需要coredll.dll和

dwmapi.dll。


这看起来很奇怪,因为dll不是针对任何嵌入式的
平台,它仅针对x86平台。


此外,当我尝试进入新版本时()获取第一个对象在

dll中,我收到以下消息:


托管调试助手''FatalExecutionEngineError''检测到C:\ MyApp\MyApp.exe中的
问题。


附加信息:运行时遇到致命错误。错误的

地址在线程0xa20处为0x79e7edd5。错误代码是

0x00000005。此错误可能是CLR中的错误,也可能是用户代码中不安全或

不可验证部分的错误。此错误的常见来源包括COM-Interop或PInvoke的
用户编组错误,这可能会破坏

堆栈。


我不是COM-Interop的专家,但我相信C ++管理代码可以利用

来实现其.NET集成魔术。


您能否向我提供有关上述问题的任何信息?


您能否向我提供有关dll

出口和一般访问的基础知识和问题还是一个dll方法和/或对象?


谢谢


Phnimx

I''ve completed migrating one of our company''s C++ Managed Code
applications to VS2005. I''m now attempting to run the application but there
seems to be problems when accessing an object that is properly exported from
a utility dll of ours. The dll is written in MFC with sections of C++
Managed Code.

The dll exports its objects in the same manner as any VS2005 Solution Wizard
driven win32 dll base code, using the model: __declspec(dllexport).

In fact when I peer into the dll with the DepedencyWalker app, the exports
are readily visible.

I copied msvcr80d.dll into the dll''s folder before implementing
DepedencyWalker app on the dll.

DepedencyWalker complains that msvcr80d.dll requires coredll.dll and
dwmapi.dll.

This seems strange because the dll is NOT targeted for any embedded
platforms, it''s targeted for x86 platforms only.

Further, when I attempt to step into the new(ing) up of the first object in
the dll, I get the following message:

"Managed Debugging Assistant ''FatalExecutionEngineError'' has detected a
problem in C:\MyApp\MyApp.exe.

Additional Information: The runtime has encountered a fatal error. The
address of the error was at 0x79e7edd5 on thread 0xa20. The error code is
0x00000005. This error may be a bug in the CLR or in the unsafe or
non-verifiable portions of user code. Common sources of this bug include
user marshaling error for COM-Interop or PInvoke, which may corrupt the
stack."

I''m not an expert in COM-Interop but I believe C++ Managed Code leverages
just that to accomplish its .NET integration magic.

Can you provide me with any information on the above issues?

Can you provide me with the basics and the gotchas with regard to dll
exports and general access or a dlls methods and/or objects?

Thanks

Phnimx

推荐答案

Hi Phnimx,

#1,Dependency Walker问题。

这看起来像一个奇怪的问题。我搜索了所有内部的

数据库,发现没有与之相关的记录报告。


您是否在开发盒或系统上遇到此问题

没有VS.NET

如果你的问题出现在没有VS.NET 2005的系统中,那么:

1。您可以部署调试版本并尝试一下。

2.确保系统具有VC redist(记住VC的调试版本

运行时不可分发) ,你可以通过查看

%SystemRoot%\ winsxs文件夹来检查这一点,并查看包含

Microsoft.CRT或Microsoft.MFC或Microsoft.ATL的文件夹。还要注意处理器

类型。


另一种可能性是你找到并复制了Windows CE版本的

msvcr80d.dll到目录。你可以给它一张支票。


#2,''FatalExecutionEngineError''问题。

通常,FatalExecutionError管理调试助手(MDA)是
公共语言运行时(CLR)中的致命错误已检测到
时激活>
。你在VS2005调试器下得到这个错误吗?如果您在没有调试的情况下使用Exe

,问题是否仍然存在?

就调试器而言,请确保Debugger type设置为

" Mixed",您可以在调试中查看此内容。项目选项

属性。这应该允许您进入托管代码和非托管代码。

此问题是否仍然存在?


我将等待您的进一步信息。谢谢。


祝你好运,

Jeffrey Tan

微软在线社区支持

=== ===============================================

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务是针对非紧急问题

如果社区或微软支持人员在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx

======================================== ==========

此帖子按原样提供。没有保证,也没有授予任何权利。

Hi Phnimx,

#1, Dependency Walker problem.
This looks like a strange problem. I have searched all the internal
database and found no records reported related to it.

Are you running into this problem on the development box or a system that
does not has VS.NET

If your problem occurs in system without VS.NET 2005, then:
1. You may deploy the debug build and give it a try.
2. Make sure that the system has the VC redist (remember debug builds of VC
Runtime are not distributable), you can check this by looking at
%SystemRoot%\winsxs folder and look out for folders containing
Microsoft.CRT, or Microsoft.MFC or Microsoft.ATL. Also note the processor
type.

Another possibility is that you found and copied the Windows CE build of
msvcr80d.dll to the directory. You may give this a check.

#2, ''FatalExecutionEngineError'' problem.
Normally, FatalExecutionError managed debugging assistant (MDA) is
activated when a fatal error in the common language runtime (CLR) has been
detected. Do you get this error under VS2005 debugger? If you use the Exe
without debugging, does the problem still exist?

As far as debugger is concerned, make sure that "Debugger type" is set to
"Mixed", you can check this in the "Debugging" option of the project
properties. This should allow you to step into managed and unmanaged code.
Does this problem still exist?

I will wait for your further information. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


你好Jeffrey,


感谢您的回复。我们使用了错误的msvcr80d.dll。


使用正确的使用coredll.dll和''FatalExecutionEngineError''

问题消失。


然而,当我们试图在我们的实用程序dll中获取一个对象时,我在''afxwin1.inl''的一个ASSERT中找到了

(很多次) />

_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()


{ASSERT(afxCurrentResourceHandle!= NULL);


返回afxCurrentResourceHandle; }


虽然我可以忽略一些断言,但我得到了实用程序dll中每个

单个LoadString()断言的点。


我们的实用程序dll主要是基于MFC的。在链接器设置中


强制符号引用= __DllMainCRTStartup @ 12。


这当然意味着我们传递了DLLMain()的实现MFC

框架。


奇怪的是当我在CMyWinApp :: InitInstance()中设置断点时

我们的CWinApp派生课程,它没有打破?


来电申请EXE在我们的

实用程序中是新的CUtil课程DLL。这个''CUtil''类不是CMyWinApp类。

''CUtil''类的ctor包含以下行。


AFX_MANAGE_STATE(AfxGetStaticModuleState())


问题似乎是MFC无法获得

实用程序dll的资源句柄。


任何想法我们都是在这里找不到?


您能提供一些其他方法,可以提供帮助吗?


谢谢,


phnimx


"" Jeffrey Tan [MSFT]"" < je *** @ online.microsoft.com写信息

新闻:5c ************** @ TK2MSFTNGHUB02.phx.gbl ...
Hi Jeffrey,

Thank you for your reply. We were using the wrong msvcr80d.dll.

Using the correct one makes the coredll.dll and ''FatalExecutionEngineError''
issues disappear.

However, when attempting to acquire an object in our utility dll, I find
myself (many times) at an ASSERT in ''afxwin1.inl''

_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()

{ ASSERT(afxCurrentResourceHandle != NULL);

return afxCurrentResourceHandle; }

While I can ignore a number of assertions, I get to a point where every
single LoadString() in the utility dll asserts.

Our utility dll is mostly MFC based. In the linker settings

Force Symbol References = __DllMainCRTStartup@12.

This of course means that we pass the implementation of DLLMain() the MFC
framework.

The strange thing is when I set a breakpoint in CMyWinApp::InitInstance()
our CWinApp derivation class, it doesn''t break?

The caller application EXE is "new"ing up a ''CUtil'' class within our
utility dll. This ''CUtil'' class is NOT the CMyWinApp class. The ctor of the
''CUtil'' class contains the following line.

AFX_MANAGE_STATE(AfxGetStaticModuleState())

The problem seems to be that MFC can''t get the resource handle to the
utility dll.

Any ideas what we''re missing here?

Can you suggest any alternative methods that can help?

Thanks,

phnimx


""Jeffrey Tan[MSFT]"" <je***@online.microsoft.comwrote in message
news:5c**************@TK2MSFTNGHUB02.phx.gbl...

嗨Phnimx,

#1,Dependency Walker问题。

这看起来像一个奇怪的问题。我搜索了所有内部的

数据库,发现没有与之相关的记录报告。


您是否在开发盒或系统上遇到此问题

没有VS.NET

如果你的问题出现在没有VS.NET 2005的系统中,那么:

1。您可以部署调试版本并尝试一下。

2.确保系统具有VC redist(请记住调试版本

VC

运行时不可分发),您可以通过查看

%SystemRoot%\ winsxs文件夹来检查这一点,并查看包含

Microsoft.CRT的文件夹,或者Microsoft.MFC或Microsoft.ATL。还要注意处理器

类型。


另一种可能性是你找到并复制了Windows CE版本的

msvcr80d.dll到目录。你可以给它一张支票。


#2,''FatalExecutionEngineError''问题。

通常,FatalExecutionError管理调试助手(MDA)是
公共语言运行时(CLR)中的致命错误已检测到
时激活>
。你在VS2005调试器下得到这个错误吗?如果您在没有调试的情况下使用Exe

,问题是否仍然存在?

就调试器而言,请确保Debugger type设置为

" Mixed",您可以在调试中查看此内容。项目选项

属性。这应该允许您进入托管代码和非托管代码。

此问题是否仍然存在?


我将等待您的进一步信息。谢谢。


祝你好运,

Jeffrey Tan

微软在线社区支持

=== ===============================================

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务是针对非紧急问题

如果社区或微软支持人员在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx

======================================== ==========

此帖子按原样提供。没有保证,也没有赋予

权利。
Hi Phnimx,

#1, Dependency Walker problem.
This looks like a strange problem. I have searched all the internal
database and found no records reported related to it.

Are you running into this problem on the development box or a system that
does not has VS.NET

If your problem occurs in system without VS.NET 2005, then:
1. You may deploy the debug build and give it a try.
2. Make sure that the system has the VC redist (remember debug builds of
VC
Runtime are not distributable), you can check this by looking at
%SystemRoot%\winsxs folder and look out for folders containing
Microsoft.CRT, or Microsoft.MFC or Microsoft.ATL. Also note the processor
type.

Another possibility is that you found and copied the Windows CE build of
msvcr80d.dll to the directory. You may give this a check.

#2, ''FatalExecutionEngineError'' problem.
Normally, FatalExecutionError managed debugging assistant (MDA) is
activated when a fatal error in the common language runtime (CLR) has been
detected. Do you get this error under VS2005 debugger? If you use the Exe
without debugging, does the problem still exist?

As far as debugger is concerned, make sure that "Debugger type" is set to
"Mixed", you can check this in the "Debugging" option of the project
properties. This should allow you to step into managed and unmanaged code.
Does this problem still exist?

I will wait for your further information. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.



Hi Phnimx,

感谢您的反馈。


根据现有信息,很难给出明确的答案

来解决这个问题。 />

您在项目中使用任何MFC扩展dll吗?如果您使用MFC常规DLL中的MFC扩展DLL,可能会有一些

问题,

请参考下面的KB:

当您在Visual C ++中使用常规DLL中的扩展

DLL时,可能会遇到一个或多个相关问题
http://support.microsoft.com/kb/154126


当你可以在第二项中看到,存储在扩展DLL中的资源

无法加载,因为AfxFindResourceHandle返回NULL或不正确的

资源句柄。下面的帖子也证实了这种怀疑,我希望你

是同样的问题:
http://groups.google.com/group/micro...frm/thread/1f8

9e22a1cb2d0ab / ec43df099de3f11d?lnk = st& q =%22Debug +断言+ in + fi le%3Aafxwin1

.inl + line%3A22%22& rnum = 1#ec43df099de3f11d


此外,我建议您提供此故障的堆栈跟踪。它可能对查看堆栈跟踪很有用。


最后,您是否有可能创建一个小样本项目

证明了这个问题?如果我可以给它本地复制,我可以更好地理解它并给它一个故障排除。


谢谢。


祝你好运,

Jeffrey Tan

微软在线社区支持

============= =====================================

收到我的帖子的通知通过邮件?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务是针对非紧急问题

如果社区或微软支持人员在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx

======================================== ==========

此帖子按原样提供。没有保证,也没有授予任何权利。

Hi Phnimx,

Thanks for your feedback.

With the current information available it is hard to give a definite answer
to resolve this problem.

Do you use any MFC extension dll in your project? There may be some
problems if you are using an MFC Extension DLL from a MFC Regular DLL,
please refer to the KB below:
"You may encounter one or more related problems when you use an Extension
DLL from a Regular DLL in Visual C++"
http://support.microsoft.com/kb/154126

As you can see in the second item, "Resources stored in the Extension DLL
fail to load because AfxFindResourceHandle returns NULL or an incorrect
resource handle". The thread below also confirms this suspicion, I hope you
are the same problem:
http://groups.google.com/group/micro...frm/thread/1f8
9e22a1cb2d0ab/ec43df099de3f11d?lnk=st&q=%22Debug+assertion+in+fi le%3Aafxwin1
.inl+line%3A22%22&rnum=1#ec43df099de3f11d

Additionally, I recommend you provide the stack trace of this failure. It
may be useful to look at the stack trace.

Finally, is it possible for you to create little sample project
demonstrating this problem? If I can give it a local reproduce, I can
understand it better and give it a troubleshooting.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


这篇关于依赖性walker msvcr80d.dll缺少coredll.dll和dwmapi.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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