(OLD) Process and function hooking library for Windows
Striven
2026-01-31 f93c9a86e89e658c46b25a7571d8bff69ec7450f
Update minhook-zig, export minhook
3 files modified
16 ■■■■■ changed files
build.zig.zon 4 ●●●● patch | view | raw | blame | history
src/hook_singleton.zig 6 ●●●● patch | view | raw | blame | history
src/root.zig 6 ●●●●● patch | view | raw | blame | history
build.zig.zon
@@ -7,8 +7,8 @@
            .hash = "zigwin32-25.0.28-preview-AAAAAGeI5ANWTScxLlUycxTkQN25FlWjLnrYPNBjImlH",
        },
        .minhook = .{
            .url = "git+https://github.com/ScapegoatHS/minhook-zig#b558d4e7021fba0e87008ab50927455f2ecdd8f8",
            .hash = "minhook-0.1.0-SLhoAxtHAAAVqUbG6KPQWPGA5sFaSCIO4VV226UkVwJI",
            .url = "git+https://github.com/ScapegoatHS/minhook-zig#f5d7164c9931b122da4af44e61e9783fe8ba09d9",
            .hash = "minhook-0.1.0-SLhoA2lHAAAYsR-f9ScFMlqsNAgi5DtCjsJCnCjF2KWO",
        },
    },
    .paths = .{
src/hook_singleton.zig
@@ -4,7 +4,11 @@
const memory = @import("memory.zig");
pub fn HookSingleton(comptime log_scope: @Type(.enum_literal), comptime function_ref: memory.Function, comptime detour_function: anytype) type {
pub fn HookSingleton(
    comptime log_scope: @Type(.enum_literal),
    comptime function_ref: memory.Function,
    comptime detour_function: anytype,
) type {
    return struct {
        pub const scope = log_scope;
        pub const log = std.log.scoped(log_scope);
src/root.zig
@@ -1,9 +1,11 @@
pub const minhook = @import("minhook");
pub const HookSingleton = @import("hook_singleton.zig").HookSingleton;
pub const memory = @import("memory.zig");
pub const Module = @import("Module.zig");
pub const Pattern = @import("Pattern.zig");
comptime {
    _ = @import("Pattern.zig");
pub fn init() !void {
    try minhook.init();
}