[Refactor] libloader

This commit is contained in:
xiaozhou233 committed 2026-03-07 17:44:27 +08:00
1 parent 172f354b04
commit 9b24ea0ae4
4 files changed
+15 -12

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
#include <JuiceAgent/Logger.hpp>
#include <libloader.hpp>
void libloader::entrypoint(const char* runtime_dir) {
PLOGI << "libloader entrypoint";
}
-10
View File
@@ -1,10 +0,0 @@
#ifndef LIBAGENT_H
#define LIBAGENT_H
#include <stdbool.h>
extern "C" __declspec(dllexport)
bool InitJuiceAgent(const char* runtime_path);
#endif // LIBAGENT_H
+6
View File
@@ -0,0 +1,6 @@
#pragma once
namespace libloader
{
void entrypoint(const char* runtime_dir);
} // namespace libloader
+2 -2
View File
@@ -1,6 +1,6 @@
#include <windows.h>
#include <JuiceAgent/Logger.hpp>
#include <libloader.h>
#include <libloader.hpp>
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved ) {
switch( fdwReason )
@@ -11,7 +11,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved ) {
const char* runtime_dir = (const char*)lpReserved;
InitJuiceAgent(runtime_dir);
libloader::entrypoint(runtime_dir);
break;
}