hooklib/dll.c: Add dynamic loader hook mechanism

This commit is contained in:
Tau
2019-05-14 17:12:34 -04:00
parent 1b93551a41
commit 96b1981e01
3 changed files with 348 additions and 0 deletions

18
hooklib/dll.h Normal file
View File

@ -0,0 +1,18 @@
#pragma once
#include <stddef.h>
#include <stdint.h>
#include "hook/table.h"
struct dll_symbol {
void *ptr;
const char *name;
uint16_t ordinal;
};
HRESULT dll_hook_push(
HMODULE redir_mod,
const wchar_t *name,
const struct hook_symbol *syms,
size_t nsyms);