mirror of
https://github.com/UzixLS/KernelEx.git
synced 2025-07-19 07:21:20 +03:00
import KernelEx-4.5-Beta1
This commit is contained in:
25
apilibs/kexbasen/main.c
Normal file → Executable file
25
apilibs/kexbasen/main.c
Normal file → Executable file
@ -30,7 +30,7 @@
|
||||
#include "shell32/_shell32_apilist.h"
|
||||
#include "rpcrt4/_rpcrt4_apilist.h"
|
||||
#include "winspool/_winspool_apilist.h"
|
||||
#include "shlwapi/_shlwapi_apilist.h"
|
||||
#include "shfolder/_shfolder_apilist.h"
|
||||
//#include "/__apilist.h"
|
||||
|
||||
static apilib_api_table api_table[10];
|
||||
@ -45,7 +45,7 @@ static void fill_apitable()
|
||||
api_table[5] = apitable_shell32;
|
||||
api_table[6] = apitable_rpcrt4;
|
||||
api_table[7] = apitable_winspool;
|
||||
api_table[8] = apitable_shlwapi;
|
||||
api_table[8] = apitable_shfolder;
|
||||
//last entry is null terminator
|
||||
}
|
||||
|
||||
@ -57,9 +57,19 @@ const apilib_api_table* get_api_table()
|
||||
return api_table;
|
||||
}
|
||||
|
||||
BOOL init()
|
||||
static BOOL init()
|
||||
{
|
||||
return common_init() && init_kernel32() && init_gdi32() && init_user32() && init_advapi32() && init_comdlg32() && init_shell32() && init_rpcrt4() && init_winspool() && init_shlwapi();
|
||||
return common_init() && init_kernel32() && init_gdi32() && init_user32() && init_advapi32() && init_comdlg32() && init_shell32() && init_rpcrt4() && init_winspool() && init_shfolder();
|
||||
}
|
||||
|
||||
static void uninit()
|
||||
{
|
||||
uninit_kernel32();
|
||||
}
|
||||
|
||||
static void detach()
|
||||
{
|
||||
detach_kernel32();
|
||||
}
|
||||
|
||||
BOOL APIENTRY DllMain(HINSTANCE instance, DWORD reason, BOOL load_static)
|
||||
@ -67,13 +77,14 @@ BOOL APIENTRY DllMain(HINSTANCE instance, DWORD reason, BOOL load_static)
|
||||
switch (reason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
// kexDebugPrint("KernelEx Base Non-shared library reporting in action!\n");
|
||||
DisableThreadLibraryCalls(instance);
|
||||
if (!init())
|
||||
return FALSE;
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
// kexDebugPrint("KernelEx Base Non-shared library signing off!\n");
|
||||
uninit();
|
||||
break;
|
||||
case DLL_THREAD_DETACH:
|
||||
detach();
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user