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:
icex2
2024-08-14 17:53:51 +02:00
parent 82d1a2df52
commit 93e0a090bc
338 changed files with 1307 additions and 641 deletions
+1
View File
@@ -4,6 +4,7 @@ ldflags_iidx-bio2-exit-hook := \
-lsetupapi \
libs_iidx-bio2-exit-hook := \
core \
bio2drv \
hook \
util \
+6 -2
View File
@@ -11,10 +11,13 @@
#include "bio2/bi2a-iidx.h"
#include "bio2drv/detect.h"
#include "core/log-bt-ext.h"
#include "core/log-bt.h"
#include "core/log.h"
#include "hook/iobuf.h"
#include "hook/iohook.h"
#include "util/log.h"
#include "util/mem.h"
#include "util/proc.h"
#include "util/str.h"
@@ -224,7 +227,8 @@ static HRESULT _iohook_handler(struct irp *irp)
BOOL WINAPI DllMain(HMODULE mod, DWORD reason, void *ctx)
{
log_to_writer(log_writer_stdout, NULL);
core_log_bt_ext_impl_set();
core_log_bt_ext_init_with_stdout();
if (reason != DLL_PROCESS_ATTACH) {
return TRUE;