35 lines
801 B
C++
35 lines
801 B
C++
// dllmain.cpp : 定义 DLL 应用程序的入口点。
|
|
#include "Base.h"
|
|
#include "client_comm_shared.h"
|
|
#include "driver_func.h"
|
|
#include "client_pipe.h"
|
|
|
|
auto MainThread()->void
|
|
{
|
|
if (!driver_func::init())
|
|
{
|
|
auto string = "[Anit-Cheat]系统运行发生致命错误,错误代码:" + to_string(GetLastError());
|
|
MessageBoxA(NULL, string.c_str(), "您似乎遇到了一些问题", MB_OK);
|
|
exit(0);
|
|
}
|
|
}
|
|
|
|
BOOL APIENTRY DllMain( HMODULE hModule,
|
|
DWORD ul_reason_for_call,
|
|
LPVOID lpReserved
|
|
)
|
|
{
|
|
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
|
|
{
|
|
//AllocConsole();
|
|
//freopen("CONOUT$", "w+", stdout);
|
|
|
|
DllClientStart();
|
|
|
|
MainThread();
|
|
}
|
|
|
|
return TRUE;
|
|
}
|
|
|