本文介绍了使用visual studio 2010执行MDI应用程序失败。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Microsoft的Visual Studio 2010成功编译,链接和执行MDI应用程序.Visual Studio(专业版)在Windows XP下运行。但是,在Microsoft自动更新afxwin.h之后,应用程序构建时没有错误,但在运行时失败。显示Windows诊断消息(即文件描述遇到错误。很抱歉给您带来不便)。



我很高兴知道其他人是否遇到过这个问题。在一个调试会话中,我发现故障点就在这一行:



CRuntimeClass * pClassThis = GetRuntimeClass();


函数中包含
,CObject :: IsKindOf(const RuntimeClass * pClass);



函数IsKindOf包含在Windows组件objcore中。 cpp,并在执行MDI应用程序的InitInstance函数时调用。



我无法确定恢复以前版本的afxwin.h是否能解决问题,如我无法定期备份Visual Studio支持文件。



我尝试过:



我尝试从备份库执行旧版本的应用程序。他们执行没有失败。但是,如果我使用构建它们的源代码重建这些旧版本的应用程序,则会遇到相同的错误。

I have been successfully compiling, linking, and executing an MDI application using Microsoft's Visual Studio 2010. Visual Studio (pro edition) is running under Windows XP. However, following an automatic update of afxwin.h by Microsoft, the application builds without error, but fails at runtime. A Windows diagnostic message is displayed (i.e., "File Description has encountered an error. Sorry for the inconvenience").

I would appreciate knowing whether others have experienced this problem. In a debugging session I discovered the point of failure was the line:

CRuntimeClass* pClassThis = GetRuntimeClass() ;

contained within the function, CObject::IsKindOf(const RuntimeClass* pClass) ;

The function "IsKindOf" is contained within the Windows component, objcore.cpp, and is called during execution of the MDI application's InitInstance function.

I am unable to determine whether restoring the previous version of afxwin.h would solve the problem, as I failed to regularly backup Visual Studio support files.

What I have tried:

I have tried executing older versions of the application from backup libraries. They execute without failure. However, if I rebuild these older versions of the application using their source code with which they were built, the same error is encountered.

推荐答案




这篇关于使用visual studio 2010执行MDI应用程序失败。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 00:11