mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
[Refactor] libloader
This commit is contained in:
1 parent
172f354b04
commit
9b24ea0ae4
4 files changed
+15
-12
No files matched your search
@@ -0,0 +1,7 @@
|
||||
#include <JuiceAgent/Logger.hpp>
|
||||
#include <libloader.hpp>
|
||||
|
||||
|
||||
void libloader::entrypoint(const char* runtime_dir) {
|
||||
PLOGI << "libloader entrypoint";
|
||||
}
|
||||
@@ -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
|
||||
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace libloader
|
||||
{
|
||||
void entrypoint(const char* runtime_dir);
|
||||
} // namespace libloader
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user