Menu

Post image 1
Post image 2
1 / 2
0

ZenWinHook: A Thread-Safe Windows Hooking Library in C++

DEV Community·talkingtogod·27 days ago
#NYcnwZdn
Reading 0:00
15s threshold

I got tired of sketchy Windows hooks, so I made my own Hooking on Windows is one of those things that looks easy until it randomly crashes your process. I kept running into the same issues: threads executing half patched code, weird instruction layouts breaking inline hooks, and edge cases most libraries just ignore. So I built ZenWinHook. Why I made it Libraries like MinHook and PolyHook 2 are great, but they don’t really try to handle everything. The biggest pain for me was patching safely while multiple threads are running, that’s where things usually fall apart. What it does ZenWinHook is a small C++ library that focuses on doing hooks properly. It handles thread safe patching so you don’t get torn instructions. Inline hooks actually parse and relocate instructions instead of guessing. There are multiple hook types, so you don’t have to mix libraries.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More