refactor: Entire code base, thread and log usage
Boils down to: - Include headers - Reduce boiler plate with helpers - Swap out explicit usages with core API layer and ensure the right API is configured beforehand
This commit is contained in:
@@ -6,13 +6,14 @@
|
||||
#include <ntdef.h>
|
||||
#include <ntstatus.h>
|
||||
|
||||
#include "core/log.h"
|
||||
|
||||
#include "hook/table.h"
|
||||
|
||||
#include "hooklib/acp.h"
|
||||
|
||||
#include "util/codepage.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/log.h"
|
||||
|
||||
static NTSTATUS NTAPI my_RtlMultiByteToUnicodeN(
|
||||
wchar_t *dest,
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "core/log.h"
|
||||
|
||||
#include "hook/table.h"
|
||||
|
||||
#include "hooklib/adapter.h"
|
||||
|
||||
#include "util/codepage.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/log.h"
|
||||
|
||||
static DWORD WINAPI
|
||||
my_GetAdaptersInfo(PIP_ADAPTER_INFO adapter_info, PULONG out_buf_len);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include <windows.h>
|
||||
|
||||
#include "core/log.h"
|
||||
|
||||
#include "hook/table.h"
|
||||
|
||||
#include "hooklib/app.h"
|
||||
@@ -7,7 +9,6 @@
|
||||
#include "imports/avs.h"
|
||||
#include "imports/eapki.h"
|
||||
|
||||
#include "util/log.h"
|
||||
#include "util/str.h"
|
||||
|
||||
static dll_entry_init_t hook_dll_entry_init;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "cconfig/cconfig-util.h"
|
||||
|
||||
#include "hooklib/config-adapter.h"
|
||||
#include "core/log.h"
|
||||
|
||||
#include "util/log.h"
|
||||
#include "hooklib/config-adapter.h"
|
||||
|
||||
#define HOOKLIB_CONFIG_ADAPTER_OVERRIDE_IP_KEY "adapter.override_ip"
|
||||
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
#include <stdbool.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "core/log.h"
|
||||
|
||||
#include "hook/hr.h"
|
||||
#include "hook/iohook.h"
|
||||
#include "hook/table.h"
|
||||
|
||||
#include "util/array.h"
|
||||
#include "util/log.h"
|
||||
#include "util/str.h"
|
||||
|
||||
struct file_entry {
|
||||
|
||||
@@ -14,12 +14,13 @@
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "core/log.h"
|
||||
|
||||
#include "hook/hr.h"
|
||||
#include "hook/iohook.h"
|
||||
#include "hook/table.h"
|
||||
|
||||
#include "util/array.h"
|
||||
#include "util/log.h"
|
||||
|
||||
/* RS232 API hooks */
|
||||
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include "core/log.h"
|
||||
|
||||
#include "hook/table.h"
|
||||
|
||||
#include "hooklib/setupapi.h"
|
||||
|
||||
#include "util/defs.h"
|
||||
#include "util/log.h"
|
||||
#include "util/str.h"
|
||||
|
||||
/* my hooks */
|
||||
|
||||
Reference in New Issue
Block a user