hook: Update capnhook source files from latest master

https://github.com/decafcode/capnhook
This commit is contained in:
icex2
2020-09-02 19:35:15 +00:00
parent 3a1005f1f8
commit a016f27652
19 changed files with 1720 additions and 757 deletions
+11 -8
View File
@@ -1,12 +1,11 @@
#ifndef HOOK_IOHOOK_H
#define HOOK_IOHOOK_H
#pragma once
#include <windows.h>
#include <stddef.h>
#include <stdint.h>
#include "util/iobuf.h"
#include "hook/iobuf.h"
enum irp_op {
IRP_OP_OPEN,
@@ -38,10 +37,14 @@ struct irp {
uint64_t seek_pos;
};
typedef HRESULT (*irp_handler_t)(struct irp *irp);
void iohook_init(const irp_handler_t *handlers, size_t nhandlers);
HANDLE iohook_open_dummy_fd(void);
HRESULT irp_invoke_next(struct irp *irp);
typedef HRESULT (*iohook_fn_t)(struct irp *irp);
HANDLE iohook_open_dummy_fd(void)
#ifdef __GNUC__
__attribute__((deprecated("Use iohook_open_nul_fd instead")))
#endif
;
HRESULT iohook_open_nul_fd(HANDLE *fd);
HRESULT iohook_push_handler(iohook_fn_t fn);
HRESULT iohook_invoke_next(struct irp *irp);