我的程序在XP上工作正常,但挂在Windows 7上 [英] My program works fine on XP, but hangs on Windows 7
问题描述
大家好!
我想首先感谢所有花时间查看此主题并尝试提供帮助的人。
我用C ++编写了一个应用程序,它使用WIN32 API和ADO查询数据库并在列表视图中显示结果。
当我在Windows XP上测试时,一切正常,但是当我在Windows 7上测试它时,我的应用程序开始挂起。我必须杀死它,否则它似乎会永远停留。
我怀疑DEP或某些UAC设置是罪魁祸首,但我不知道该怎么做。
当我尝试设置DEP以允许我的程序运行,它报告说它不能完成。
一个可能有用的小注释:
我复制了从早期项目查询数据库的代码,该项目也必须查询数据库,并使用WIN32 API和ADO用C ++编写。
该项目适用于机器人h Windows XP和Windows 7.
如果需要任何其他信息(源代码或类似的东西),请提出要求,我将非常乐意提供。
Hello everyone!
I would like to start by saying thanks to everyone who takes some time to view this thread and try to help.
I have written an application in C++ that uses WIN32 API and ADO to query a database and display results in a listview.
Everything works fine, when I test it on Windows XP, but my application starts to "hang" when I test it on Windows 7. I have to "kill" it, or else it seems it would be stuck forever.
I suspect that DEP or some UAC setting is the culprit here, but I can''t figure out what to do.
When I try to set DEP to allow my program to run, it reports that it can''t be done.
A small note that might help:
I have copied the code for querying the database from my earlier project, which also had to query the database, and was written in C++ using WIN32 API and ADO.
That project works well on both Windows XP and Windows 7.
I work in MS Visual Studio Express 2008, on Windows XP, in C++, using WIN32 API.
If any other information is required ( source code or something similar ), please ask for it, I will more than gladly supply it.
推荐答案
查看将C ++应用程序从XP移植到Vista / 7 [ ^ ]用于分析兼容性问题的一些提示。
尝试以管理员身份运行。如果这有帮助,您可能会写入程序文件子文件夹:您需要重构该代码以将您的用户数据存储到其他位置。
也许此链接还有助于识别潜在问题:应用程序兼容性 [ ^ ]。
干杯
Andi
Have a look at Porting C++ Application From XP to Vista/7[^] for some hints to analyze compatibility issues.
Try running as administrator. If that helps, you probably write into program files sub folders: you need to refactor that code to store your user data to some other location.
Maybe this link also helps identify potential issues: Application Compatibility[^].
Cheers
Andi
这篇关于我的程序在XP上工作正常,但挂在Windows 7上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!