Update minhook-zig, export minhook
| | |
| | | .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 = .{ |
| | |
| | | |
| | | 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); |
| | |
| | | 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(); |
| | | } |