是否可以在运行时设置应用程序的 Windows 兼容模式?

发布于 2024-08-11 00:58:54 字数 144 浏览 3 评论 0原文

我们使用的第三方库有时无法在 Win7 上正常工作。我们知道如何在安装时配置它,但我们也想考虑在运行时设置它。这是否可能,或者是否必须在启动之前设置该上下文? (我认为机会很小甚至没有,但我想我还是会问)

(C++ 应用程序 - 并不是说​​它真的很重要)

We are using a 3rd party library that sometimes does not work correctly on Win7. WE know how to configure this at installation time, but we'd also like to consider setting it at run time. Is this possible, or does that context have to be set prior to launch? (I think there is a slim to none chance, but figured I would ask anyway)

(C++ application - not that it really matters)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

怪我太投入 2024-08-18 00:58:54

应用程序运行后,兼容性设置就无法更改。

但是,您可以做的是拥有一个启动器应用程序,确保兼容性设置正确,然后启动您的应用程序。当然,您需要确保启动器应用程序不存在兼容性问题。

The compatibility settings can't be changed once the application is running.

However, what you could do is have a launcher application that makes sure the compatibility settings are correct and then launches your application. Of course, you need to make sure the launcher application doesn't have compatibility problems.

你不是我要的菜∠ 2024-08-18 00:58:54

兼容性设置只是预处理器宏,它会屏蔽头文件中在所选平台上不可用的部分 Win32 API。

但是,由于整个 API 是由 DLL 提供的,因此您可以确定运行时正在运行的操作系统,然后使用 LoadLibraryGetProcAddress

The compatibility settings are merely preprocessor macros that block out parts of the Win32 API in the header files that are not available on the selected platform.

However because the entire API is provided by DLLs you can determine what OS is running at run-time and then get the necessary platform specific entry points using LoadLibrary and GetProcAddress.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文