简体   繁体   English

在 Win7 上编译的程序在 XP 中崩溃 (Visual C++ 6)

[英]Program compiled on Win7 crashes in XP (Visual C++ 6)

I have a rather large codebase that I've inherited and I'm kind of stuck in the past for the moment.我有一个相当大的代码库,我继承了它,现在我有点被困在过去。 I'm working in Visual C++ 6 in Windows 7 (32-bit), however, I'm targeting an XP machine (Service Pack 2).我在 Windows 7(32 位)中使用 Visual C++ 6,但是,我的目标是 XP 机器(Service Pack 2)。 Corporate doesn't see the ROI of upgrading it to .NET and I've got about as much pull as a Mini Cooper towing a train. Corporate 没有看到将其升级到 .NET 的投资回报率,而我的吸引力与拖曳火车的 Mini Cooper 差不多。

With that said, I did seemingly successfully install VC++6 (without XP compatibility) on my Win7 machine and I can compile and run fine.话虽如此,我似乎成功地在我的 Win7 机器上安装了 VC++6(不兼容 XP),并且我可以编译并运行良好。 However, when I try to deploy my release build to my XP machine, it crashes (while it does not crash on Win7).但是,当我尝试将我的发布版本部署到我的 XP 机器时,它崩溃了(虽然它在 Win7 上不会崩溃)。 If, however, I build the same code on the XP machine directly, it'll work fine.但是,如果我直接在 XP 机器上构建相同的代码,它会正常工作。 Running VC++6 on my Win7 machine in XP compatibility mode crashes the IDE upon opening of my workspace.在我的 Win7 机器上以 XP 兼容模式运行 VC++6 会在打开我的工作区时使 IDE 崩溃。

The only thing I can possibly think of is that the code makes extensive use of ActiveX controls and the registry.我唯一能想到的就是代码大量使用了 ActiveX 控件和注册表。 I'm not sure if maybe there's some Win7 specific registry modifications that are being made or vice-versa.我不确定是否正在进行一些特定于 Win7 的注册表修改,反之亦然。 Then again, I know very little about the registry;再说一次,我对注册表知之甚少。 I'm definitely much more comfortable working in a Unix environment when coding for pleasure, especially when I code in C/C++.在为乐趣编码时,我在 Unix 环境中工作肯定会舒服得多,尤其是当我用 C/C++ 编码时。


Here's a screenshot of the error I'm getting when it crashes.这是我在崩溃时遇到的错误的屏幕截图。 I'm imaging it's got something to do with ActiveX registration.我想象它与 ActiveX 注册有关。

在此处输入图片说明

No, this isn't ActiveX related at all.不,这根本与 ActiveX 无关。 This is you bog-standard, 1980's type assert .这是你的沼泽标准,1980 年的类型assert As you would have noticed, had you looked at winocc.cpp line 279.正如您所注意到的,如果您查看了 winocc.cpp 第 279 行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C ++代码在Win 2000中崩溃,但在Win XP中不崩溃 - C++ code crashes in Win 2000 but does not crash in Win xp 在Visual Studio Professional 2013中编译C ++程序不适用于Windows XP SP3 - Compiled a C++ program in Visual Studio Professional 2013, will not work with Windows XP SP3 尝试在开发C ++ Win7中编译Winsock程序-错误 - Trying to compile winsock program in dev C++ win7 - error 用MinGW编译的C ++ HelloWorld程序因“非法参数”而崩溃 - C++ HelloWorld program compiled with MinGW crashes with “Illegal Argument” 套接字C ++程序在运行时成功编译崩溃 - Socket C++ program successfully compiled crashes at runtime 设置任务栏位置Win7 C ++ - Set Taskbar position Win7 c++ 如何创建不需要Vista / Win7用户安装Visual C ++可再发行组件的Windows可执行文件? - How to create a windows executable that does not require Vista/Win7 users to install the Visual C++ redistributable? Visual c ++ 2010错误,将User32.dll导入64位win7 - visual c++ 2010 errors importing User32.dll into 64bit win7 Visual C ++ 2012 Express编译的应用程序无法在Windows XP上运行吗? - Visual C++ 2012 Express compiled application does not work on Windows XP? C ++ / Win32:XP视觉样式 - 没有控件出现? - C++/Win32 : XP Visual Styles - no controls are showing up?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM