jvs/jvs-util.c: Add JVS dispatch helper

This commit is contained in:
Tau
2018-11-08 14:19:15 -05:00
parent 484931ccf3
commit ffe929d8ea
3 changed files with 132 additions and 0 deletions

21
jvs/jvs-util.h Normal file
View File

@ -0,0 +1,21 @@
#pragma once
#include <windows.h>
#include <stddef.h>
#include <stdint.h>
#include "hook/iobuf.h"
typedef HRESULT (*jvs_dispatch_fn_t)(
void *ctx,
struct const_iobuf *req,
struct iobuf *resp);
void jvs_crack_request(
const void *bytes,
size_t nbytes,
struct iobuf *resp,
uint8_t jvs_addr,
jvs_dispatch_fn_t dispatch_fn,
void *dispatch_ctx);