Windows:如何创建自定义的appcompat垫片(应用程序修复)? [英] Windows: How to create custom appcompat shims (Application Fixes)?

查看:185
本文介绍了Windows:如何创建自定义的appcompat垫片(应用程序修复)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows能够应用

Windows has the capability to apply shims to mis-behaving applications. Shims are used to intercept API calls and change it. For example, shims can be used to:

  • 更改传入的参数
  • 关于返回值的谎言
  • 将其更改为其他名称

应用程序兼容性Tookit 有很多现有的垫片可以适用于您自己的行为异常的应用程序.下面是一个示例,该示例忽略了您的API调用,而是改为调用完全不同的API:

The Application Compatibility Tookit has quite a few existing shims you can apply to your own mis-behaving application. Here's an example of one that ignores your API call and instead calls a completely different API instead:

我需要的垫片不是Microsoft已经编写的数百种垫片之一. 我需要自定义填充程序.

i need a shim that isn't one of the hundreds of shims Microsoft already wrote. i need a custom shim.

就我而言,我想拦截对以下内容的呼叫:

In my case i want to intercept calls to:

GetSystemMetrics(0x1000)

,以便它返回0.我找不到有关如何给Windows我自己的DLL的任何信息,该文件将具有我需要的修复程序.我什至不知道您是否可以创建自定义垫片.

so that it returns 0. i can't find any information on how to give Windows my own DLL that will have the fix i need. i don't even know if you can create custom shims.

Windows是否支持自定义垫片?

Does Windows support custom shims?

推荐答案

除了Microsoft实现appcompat填充程序以外,我不知道有人采取其他任何方式.

I'm not aware of any way of someone other than Microsoft implementing an appcompat shim.

您可能想调查绕行路线,它可能会为您提供功能想要.

You might want to investigate Detours, it might provide the functionality you want.

这篇关于Windows:如何创建自定义的appcompat垫片(应用程序修复)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆