简体   繁体   English

.dll 只能在 Windows XP 和 Vista 上正常工作,但不是 7?

[英].dll only works properly on Windows XP and Vista but not 7?

I have a windows.dll file (from a third-party - which have discontinued supporting it and I don't have the C sourcecode to rectify the problems).我有一个 windows.dll 文件(来自第三方 - 已停止支持它,我没有 C 源代码来纠正问题)。

I'm using the.dll in a project of mine.我在我的一个项目中使用.dll。

The.dll file works perfectly fine under Windows XP/Vista (as it was released at the time of when these OS versions were current/latest) - the issue is now that the project is now limited to Windows XP/Vista users (due to that.dll) - when it runs under Windows 7 it slightly malfunctions (ie. produces different results then compared to Windows XP/Vista). .dll 文件在 Windows XP/Vista 下工作得非常好(因为它是在这些操作系统版本是最新/最新版本时发布的) - 现在的问题是该项目现在仅限于 ZAEA23489CE3AA9B6406EBB28E0CDA 用户that.dll) - 当它在 Windows 7 下运行时,它会出现轻微故障(即,与 Windows XP/Vista 相比产生不同的结果)。

I believe the problem is Microsoft must have changed something (within the Windows library or something?) which is effecting the compatibility.我相信问题是微软一定改变了一些东西(在 Windows 库或其他东西中?)这会影响兼容性。

So I was wondering - I know its not really the best option but as a temporary/hackish workaround is their someway I can emulate Windows XP/Vista functionality for the Windows 7 users, ie.所以我想知道 - 我知道它并不是最好的选择,但作为一种临时/hackish 解决方法,我可以为 Windows 7 个用户模拟 Windows XP/Vista 功能,即。 is their any projects designed for this - example => http://www.busybox.net/about.html (which allows Linux functionality to be able to be executed on Windows).是他们为此设计的任何项目 - 示例 => http://www.busybox.net/about.html (允许 Linux 功能能够在 Windows 上执行)。

Appreciate all suggestions/workarounds.感谢所有建议/解决方法。

That sounds too easy: But what about Windows Compatibility Mode?这听起来太简单了:但是 Windows 兼容模式呢? Maybe it works.也许它有效。

In Windows 7, you can run an executable in Compatibility Mode, and set it to run in a mode compatible with Windows XP.在 Windows 7 中,您可以在兼容模式下运行可执行文件,并将其设置为在与 Windows XP 兼容的模式下运行。 For details, see Make older programs run in this version of Windows .有关详细信息,请参阅使旧程序在此版本的 Windows 中运行


Note that, you can't force this.DLL to always use a compatibility mode, but you can change your installer to make the appropriate registry settings for the user or machine that do this.请注意,您不能强制 this.DLL 始终使用兼容模式,但您可以更改安装程序,为执行此操作的用户或计算机进行适当的注册表设置。

All you need to do is add a registry key as follows.您需要做的就是添加一个注册表项,如下所示。 Under:在下面:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Application Compatibility\Layers

Add a key like:添加一个键,如:

"Path\To\Program\YourExecutable.exe"=WINXPSP2

This will cause your program to always run under compat mode.这将导致您的程序始终在兼容模式下运行。 You can also set this in HKCU if you prefer to just set it for the current user.如果您更愿意为当前用户设置它,您也可以在 HKCU 中设置它。

You could try running your app on Windows 7 under Windows XP Compatibility mode and compare the results to those from native Windows XP.您可以尝试在Windows XP 兼容模式下在 Windows 7 上运行您的应用程序,并将结果与原生 Windows XP 的结果进行比较。

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

相关问题 CreateDirectory()C(Windows VISTA / XP) - CreateDirectory() C (Windows VISTA/XP) 管理Windows XP和Vista / Server 2008之间的Windows API差异 - Managing windows API differences between Windows XP and Vista/Server 2008 新创建的挂起进程的 EIP 仅在 Windows XP 上失败 - kernel32.dll 映像下的 EIP? - Newly created suspended process's EIP is failing only on Windows XP - EIP under kernel32.dll image? 在Windows 7下编译的Dll在Windows XP中不起作用 - Dll compiled under Windows 7 doesn't work in Windows XP DllImport在Windows XP SP3上失败,但在Windows 7上工作 - DllImport fails on windows XP SP3 but works on windows 7 在Windows XP中手动更新shell32.dll是否安全/可行? - Is it safe/practical to manually update shell32.dll in Windows XP? 区分Vista和XP [C] - Tell difference between Vista and XP [C] VirtualProtectEx函数失败-错误487,仅在Windows XP上 - VirtualProtectEx function failing - error 487, only on Windows XP Native C.dll on Windows referenced by .NET 6 App only works when Visual Studio with C++ Desktop Extension is installed - Native C.dll on Windows referenced by .NET 6 App only works when Visual Studio with C++ Desktop Extension is installed Windows Xp-找不到入口点gettickcount64 kernel32.dll - Windows Xp - entry point gettickcount64 could not be located kernel32.dll
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM