2023-01-03 05:35:53 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2023-12-11 00:48:40 +01:00
|
|
|
void reg_hook_apply_hooks(HMODULE target);
|
|
|
|
|
2023-01-03 05:35:53 +01:00
|
|
|
struct reg_hook_val {
|
|
|
|
const wchar_t *name;
|
|
|
|
HRESULT (*read)(void *bytes, uint32_t *nbytes);
|
|
|
|
HRESULT (*write)(const void *bytes, uint32_t nbytes);
|
|
|
|
uint32_t type;
|
|
|
|
};
|
|
|
|
|
|
|
|
HRESULT reg_hook_push_key(
|
|
|
|
HKEY root,
|
|
|
|
const wchar_t *name,
|
|
|
|
const struct reg_hook_val *vals,
|
|
|
|
size_t nvals);
|
|
|
|
|
|
|
|
HRESULT reg_hook_read_bin(
|
|
|
|
void *bytes,
|
|
|
|
uint32_t *nbytes,
|
|
|
|
const void *src_bytes,
|
|
|
|
size_t src_nbytes);
|
|
|
|
|
|
|
|
HRESULT reg_hook_read_u32(
|
|
|
|
void *bytes,
|
|
|
|
uint32_t *nbytes,
|
|
|
|
uint32_t src);
|
|
|
|
|
|
|
|
HRESULT reg_hook_read_wstr(
|
|
|
|
void *bytes,
|
|
|
|
uint32_t *nbytes,
|
|
|
|
const wchar_t *src);
|