Skip to content

Commit 77944f6

Browse files
committed
[DOCS] Update README.md
1 parent ba35d67 commit 77944f6

File tree

2 files changed

+28
-14
lines changed

2 files changed

+28
-14
lines changed

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,25 @@ And here is a [Todo List](https://github.com/KNSoft/KNSoft.SlimDetours/milestone
3030

3131
### TL;DR
3232

33-
[KNSoft.SlimDetours package](https://www.nuget.org/packages/KNSoft.SlimDetours) is out-of-the-box, contains both of [SlimDetours](https://github.com/KNSoft/KNSoft.SlimDetours) and the original [Microsoft Detours](https://github.com/microsoft/Detours), install to project and the compiled library will be linked automatically.
34-
35-
Include header [SlimDetours.h](https://github.com/KNSoft/KNSoft.SlimDetours/blob/main/Source/SlimDetours/SlimDetours.h) for KNSoft.SlimDetours, or header [detours.h](https://github.com/KNSoft/KNSoft.SlimDetours/blob/main/Source/Detours/src/detours.h) for the original [Microsoft Detours](https://github.com/microsoft/Detours), then link compiled library `KNSoft.SlimDetours.lib`.
33+
[KNSoft.SlimDetours package](https://www.nuget.org/packages/KNSoft.SlimDetours) is out-of-the-box, contains both of [KNSoft.SlimDetours](https://github.com/KNSoft/KNSoft.SlimDetours) and the latest [Microsoft Detours](https://github.com/microsoft/Detours), include corresponding header ([SlimDetours.h](https://github.com/KNSoft/KNSoft.SlimDetours/blob/main/Source/SlimDetours/SlimDetours.h) or [detours.h](https://github.com/KNSoft/KNSoft.SlimDetours/blob/main/Source/Microsoft.Detours/src/detours.h)) and compiled static library to use them.
3634

3735
```C
38-
#include <KNSoft/SlimDetours/SlimDetours.h> // KNSoft.SlimDetours
39-
#include <KNSoft/SlimDetours/detours.h> // Microsoft Detours
36+
/* KNSoft.SlimDetours */
37+
#include <KNSoft/SlimDetours/SlimDetours.h>
38+
#pragma comment(lib, "KNSoft.SlimDetours.lib")
39+
40+
/* Microsoft Detours */
41+
#include <KNSoft/SlimDetours/detours.h>
42+
#pragma comment(lib, "Microsoft.Detours.lib")
4043
```
4144

42-
If your project configuration name is neither "Release" nor "Debug", [MSBuild sheet](https://github.com/KNSoft/KNSoft.SlimDetours/blob/main/Source/KNSoft.SlimDetours.targets) in NuGet package cannot link compiled library automatically, link manually is required, for example:
45+
If your project configuration name contains neither "Release" nor "Debug", [MSBuild sheet](https://github.com/KNSoft/KNSoft.SlimDetours/blob/main/Source/KNSoft.SlimDetours.targets) in NuGet package cannot determinate automatically the last level directory name ("Release" or "Debug") of library path should be used, add it manually is required, for example:
4346
```C
47+
#if DBG
4448
#pragma comment(lib, "Debug/KNSoft.SlimDetours.lib")
49+
#else
50+
#pragma comment(lib, "Release/KNSoft.SlimDetours.lib")
51+
#endif
4552
```
4653

4754
The usage has been simplified, e.g. the hook only needs one line:
@@ -80,7 +87,7 @@ Project building: support for the latest MSVC generation tools and SDKs is mainl
8087

8188
Artifact integration: widely compatible with MSVC generation tools (support for VS2015 is known), and different compilation configurations (e.g., `/MD`, `/MT`).
8289

83-
Runtime environment: NT5 or above OS, x86/x64/ARM64 platforms.
90+
Runtime environment: NT5 or above OS, x86/x64/ARM64/ARM64EC target platforms.
8491

8592
> [!CAUTION]
8693
> In beta stage, should be used with caution. Some APIs may be altered frequently, please keep an eye out for the release notes.

README.zh-CN.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,25 @@
3030

3131
### 提要
3232

33-
[KNSoft.SlimDetours NuGet包](https://www.nuget.org/packages/KNSoft.SlimDetours)是开箱即用的,同时含有[SlimDetours](https://github.com/KNSoft/KNSoft.SlimDetours)与原版[Microsoft Detours](https://github.com/microsoft/Detours),只要安装到项目,编译好的库就会自动加入链接。
34-
35-
对于KNSoft.SlimDetours包含[SlimDetours.h](https://github.com/KNSoft/KNSoft.SlimDetours/blob/main/Source/SlimDetours/SlimDetours.h)头文件,或者对于原版[Microsoft Detours](https://github.com/microsoft/Detours)包含[detours.h](https://github.com/KNSoft/KNSoft.SlimDetours/blob/main/Source/Detours/src/detours.h)头文件,然后链接编译出的库`KNSoft.SlimDetours.lib`
33+
[KNSoft.SlimDetours NuGet包](https://www.nuget.org/packages/KNSoft.SlimDetours)是开箱即用的,同时含有[SlimDetours](https://github.com/KNSoft/KNSoft.SlimDetours)与最新的[Microsoft Detours](https://github.com/microsoft/Detours),包含对应的头文件([SlimDetours.h](https://github.com/KNSoft/KNSoft.SlimDetours/blob/main/Source/SlimDetours/SlimDetours.h) or [detours.h](https://github.com/KNSoft/KNSoft.SlimDetours/blob/main/Source/Microsoft.Detours/src/detours.h))和编译出的静态库以使用它们。
3634

3735
```C
38-
#include <KNSoft/SlimDetours/SlimDetours.h> // KNSoft.SlimDetours
39-
#include <KNSoft/SlimDetours/detours.h> // Microsoft Detours
36+
/* KNSoft.SlimDetours */
37+
#include <KNSoft/SlimDetours/SlimDetours.h>
38+
#pragma comment(lib, "KNSoft.SlimDetours.lib")
39+
40+
/* Microsoft Detours */
41+
#include <KNSoft/SlimDetours/detours.h>
42+
#pragma comment(lib, "Microsoft.Detours.lib")
4043
```
4144

42-
如果你项目的配置名称既不是“Release”也不是“Debug”,NuGet包中的[MSBuild表单](https://github.com/KNSoft/KNSoft.SlimDetours/blob/main/Source/KNSoft.SlimDetours.targets)无法自动链接编译好的库,需要手动链接,例如:
45+
如果你项目的配置名称既不包含“Release”也不包含“Debug”,NuGet包中的[MSBuild表单](https://github.com/KNSoft/KNSoft.SlimDetours/blob/main/Source/KNSoft.SlimDetours.targets)无法自动确定库路径的最后一层目录名("Release"或"Debug"),需要手动加上它,例如:
4346
```C
47+
#if DBG
4448
#pragma comment(lib, "Debug/KNSoft.SlimDetours.lib")
49+
#else
50+
#pragma comment(lib, "Release/KNSoft.SlimDetours.lib")
51+
#endif
4552
```
4653

4754
用法已进行了简化,例如挂钩仅需一行:
@@ -80,7 +87,7 @@ return SlimDetoursTransactionCommit();
8087

8188
制品集成:广泛地兼容MSVC生成工具(已知支持VS2015),以及不同编译配置(如`/MD``/MT`)。
8289

83-
运行环境:NT5及以上操作系统,x86/x64/ARM64平台
90+
运行环境:NT5及以上操作系统,x86/x64/ARM64/ARM64EC目标平台
8491

8592
> [!CAUTION]
8693
> 处于beta阶段,应慎重使用。有些API可能频繁调整,请留意发行说明。

0 commit comments

Comments
 (0)