• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

build/H30-Sep-2019-

cmake/H30-Sep-2019-

dll_resources/H30-Sep-2019-

include/H30-Sep-2019-

src/H30-Sep-2019-

.editorconfigH A D30-Sep-2019410

.gitignoreH A D30-Sep-2019355

README.mdH A D30-Sep-20194 KiB

README.md

1# MinHook
2
3[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
4
5The Minimalistic x86/x64 API Hooking Library for Windows
6
7http://www.codeproject.com/KB/winsdk/LibMinHook.aspx
8
9### Donation please
10
11I need some funds to continue developing this library. All contributions gratefully accepted.
12
13<a href='https://pledgie.com/campaigns/27314'><img alt='Click here to lend your support to: MinHook - Help me continue to develop this library and make a donation at pledgie.com !' src='https://pledgie.com/campaigns/27314.png?skin_name=chrome' border='0' ></a>
14
15### Version history
16
17- **v1.3.3 - 8 Jan 2017**
18  * Added a helper function ```MH_CreateHookApiEx```. (Thanks to asm256)
19  * Support Visual Studio 2017 RC.
20
21- **v1.3.2.1 - 9 Nov 2015**  (Nuget package only)
22  * Fixed an insufficient support for Visual Studio 2015.
23
24- **v1.3.2 - 1 Nov 2015**
25  * Support Visual Studio 2015.
26  * Support MinGW.
27
28- **v1.3.2-beta3 - 21 Jul 2015**  (Nuget package only)
29  * Support MinGW. (Experimental)
30
31- **v1.3.2-beta2 - 18 May 2015**
32  * Fixed some subtle bugs. (Thanks to RaMMicHaeL)
33  * Added a helper function ```MH_StatusToString```. (Thanks to Jan Klass)
34
35- **v1.3.2-beta - 12 May 2015**
36  * Fixed a possible thread deadlock in x64 mode. (Thanks to Aleh Kazakevich)
37  * Reduced the footprint a little more.
38  * Support Visual Studio 2015 RC. (Experimental)
39
40- **v1.3.1.1 - 7 Apr 2015**  (Nuget package only)
41  * Support for WDK8.0 and 8.1.
42
43- **v1.3.1 - 19 Mar 2015**
44  * No major changes from v1.3.1-beta.
45
46- **v1.3.1-beta - 11 Mar 2015**
47  * Added a helper function ```MH_CreateHookApi```. (Thanks to uniskz).
48  * Fixed a false memory leak reported by some tools.
49  * Fixed a degradated compatibility issue.
50
51- **v1.3 - 13 Sep 2014**
52  * No major changes from v1.3-beta3.
53
54- **v1.3-beta3 - 31 Jul 2014**
55
56  * Fixed some small bugs.
57  * Improved the memory management.
58
59- **v1.3-beta2 - 21 Jul 2014**
60
61  * Changed the parameters to Windows-friendly types. (void* to LPVOID)
62  * Fixed some small bugs.
63  * Reorganized the source files.
64  * Reduced the footprint a little more.
65
66- **v1.3-beta - 17 Jul 2014**
67
68  * Rewrote in plain C to reduce the footprint and memory usage. (suggested by Andrey Unis)
69  * Simplified the overall code base to make it more readable and maintainable.
70  * Changed the license from 3-clause to 2-clause BSD License.
71
72- **v1.2 - 28 Sep 2013**
73
74  * Removed boost dependency ([jarredholman](https://github.com/jarredholman/minhook)).
75  * Fixed a small bug in the GetRelativeBranchDestination function ([pillbug99](http://www.codeproject.com/Messages/4058892/Small-Bug-Found.aspx)).
76  * Added the ```MH_RemoveHook``` function, which removes a hook created with the ```MH_CreateHook``` function.
77  * Added the following functions to enable or disable multiple hooks in one go: ```MH_QueueEnableHook```, ```MH_QueueDisableHook```, ```MH_ApplyQueued```. This is the preferred way of handling multiple hooks as every call to `MH_EnableHook` or `MH_DisableHook` suspends and resumes all threads.
78  * Made the functions ```MH_EnableHook``` and ```MH_DisableHook``` enable/disable all created hooks when the ```MH_ALL_HOOKS``` parameter is passed. This, too, is an efficient way of handling multiple hooks.
79  * If the target function is too small to be patched with a jump, MinHook tries to place the jump above the function. If that fails as well, the ```MH_CreateHook``` function returns ```MH_ERROR_UNSUPPORTED_FUNCTION```. This fixes an issue of hooking the LoadLibraryExW function on Windows 7 x64 ([reported by Obble](http://www.codeproject.com/Messages/4578613/Re-Bug-LoadLibraryExW-hook-fails-on-windows-2008-r.aspx)).
80
81- **v1.1 - 26 Nov 2009**
82
83  * Changed the interface to create a hook and a trampoline function in one go to prevent the detour function from being called before the trampoline function is created. ([reported by xliqz](http://www.codeproject.com/Messages/3280374/Unsafe.aspx))
84  * Shortened the function names from ```MinHook_*``` to ```MH_*``` to make them handier.
85
86- **v1.0 - 22 Nov 2009**
87
88  * Initial release.
89