解决VC++ 6.0打开文件崩溃

Microsoft Visual C++ 6.0 Enterprise Edition

环境: OS Windows 7 Home Basic SP1 x64 ThinkPad OEM



使用打开(O)菜单,或快捷键Ctrl+O时崩溃

同一套件中VB等组件没有问题



搜索到微软官方给出的解决方案:

Q241396

SUMMARY

Launching the Open File dialog box in Visual C++ using the keyboard shortcut key or from theFile menu results in the following error:

Access Violation (0xC0000005) in DEVSHL.DLL at 0x5003eaed.
DevShl.Dll referenced memory at 0x0000000. The memory could not be read.
The same error occurs when you selectAdd to Project from the Project menu and clickFiles.

FileTool.exe is a sample that replaces the Open andAdd to Project menu items in Visual C++ using the Developer Studio Object Model.

The Developer Studio Object Model contains methods that both open files and add files to a project. TheBuildProject object contains an AddFile method that adds files to a project. The Documents object contains anOpen method that can open files into Developer Studio. These can be used in either a macro or Add-In.


提供了补丁下载

<a id="kb-link-1" href="http://download.microsoft.com/download/vc60ent/s1/6.0/w9xnt4/en-us/filetool.exe">FileTool.exe</a>


Installing the Add-In

    Run FileTool.Exe to extract the Visual C++ 6.0 project.
    Build the project in Visual C++ in Release or Debug configuration.
    In Visual C++, click Customize from the Tools menu.
    In the Customize dialog box, click the Add-Ins and Macro Files tab.
    Click the Browse button and locate the FileTool.dll file that was built in step 2.
    Click OK to save the settings.

A toolbar for the two commands appears.

NOTE: Only the Open command works in Visual C++ 5.0. The AddFile method was added with the Visual Studio 6.0 release.

简要翻译如下:


1、下载上述补丁,打开解压出的FileTool.dsw,编译生成Filetool.dll,将此dll放至安装位置\Microsoft Visual Studio\Common\MSDev98\AddIns。(可能需要使用Regsvr32手动注册)

2、工具→自定义


3、在Add-ins选项卡中将FileTool.DSAddIn.1勾选即可


4、使用A、O按钮来实现添加或打开文件。


Reference

微软知识库

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这2天因为有个项目需要用到VC,所以折腾一下VC环境。主要是系统Windows 7,去年折腾的时候也发现了在windows下VC6.0不能够使用打开文件和添加新文件到项目菜单项,一使用就会导致IDE程序崩溃。当时也没有深究,而且有VC6和office2007以上版本冲突的问题。所以当时遇到要添加文件或者要操作office测试的时候都是直接弄到虚拟机里折腾的。而这2天在弄vc开发环境的时候,无意中在网上看到了解决Win7下VC6打开文件报错导致其崩溃解决办法。然后就试了一下。还挺方便的。 特记录一下,备忘: 在安装或者使用Visual C++ 6.0时,凡是出现兼容性问题提示对话框,不要理会,一律把“不再显示此消息”打上勾,然后“运行程序”。其他的就默认安装就可以。 Win7下VC6打开文件报错导致其崩溃解决办法 微软针对这个问题发布了一个补丁(http://support.microsoft.com/kb/241396),下载下来自解压后,在vc6里编译一下即可使用。然后按以下步骤: 1. 把FileTool.dll文件拷贝至 C:\Program Files\Microsoft Visual Studio\Common\MSDev98\AddIns 文件夹下 2. 在cmd下手动注册该dll文件:regsvr32 "C:\Program Files\Microsoft Visual Studio\Common\MSDev98\AddIns\FileTool.dll" 3. 打开VC6,右击工具栏,自定义… -> 附加项和宏文件,选中 FileTool Developer Studio Add-in 附加项 这个时候就会出现 A 和 O 的文件栏按钮 1.Add File To Project 2.Open 4. 打开VC6->工程->定制->编辑器选择“主要”,移去FileOpen的快捷键Ctrl+O,接下来,类别->Add-ins,给这个OpenFile设置快捷键Ctrl+O;同样的方法,可以给 “添加文件”设置快捷键Ctrl+A。 5.VC6->工程->定制->工具栏,然后打开工具栏上面的“文件”,用鼠标拖着移去“打开”按钮的图标,接着把O用鼠标拖到“打开”的位置;同样的方法设置A到“工程”下的相应位置。 到这里,VC6在WIN7下基本上是没有问题的。至少目前看来还是挺稳定的。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值